]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix gdbserver SPU build
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a8c6d4fc
PA
12015-08-24 Pedro Alves <palves@redhat.com>
2
3 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4 ptid_get_lwp.
5
99b0bb12
PA
62015-08-21 Pedro Alves <palves@redhat.com>
7
8 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
9 instead of literal 1.
10
f8904751
PA
112015-08-21 Pedro Alves <palves@redhat.com>
12
13 * tdesc.c (default_description): Explicitly zero-initialize.
14
465a859e
PA
152015-08-21 Pedro Alves <palves@redhat.com>
16
17 PR gdb/18749
18 * inferiors.c (remove_thread): Discard any pending stop reply for
19 this thread.
20 * server.c (remove_all_on_match_pid): Rename to ...
21 (remove_all_on_match_ptid): ... this. Work with a filter ptid
22 instead of a pid.
23 (discard_queued_stop_replies): Change parameter to a ptid. Now
24 extern.
25 (handle_v_kill, kill_inferior_callback, captured_main)
26 (process_serial_event): Adjust.
27 * server.h (discard_queued_stop_replies): Declare.
28
f0db101d
PA
292015-08-21 Pedro Alves <palves@redhat.com>
30
31 * linux-low.c (wait_for_sigstop): Always switch to no thread
32 selected if the previously current thread dies.
33 * lynx-low.c (lynx_request_interrupt): Use the first thread's
34 process instead of the current thread's.
35 * remote-utils.c (input_interrupt): Don't check if there's no
36 current thread.
37 * server.c (gdb_read_memory, gdb_write_memory): If setting the
38 current thread to the general thread fails, error out.
39 (handle_qxfer_auxv, handle_qxfer_libraries)
40 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
41 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
42 (handle_query): Check if there's a thread selected instead of
43 checking whether there's any thread in the thread list.
44 (handle_qxfer_threads, handle_qxfer_btrace)
45 (handle_qxfer_btrace_conf): Don't error out early if there's no
46 thread in the thread list.
47 (handle_v_cont, myresume): Don't set the current thread to the
48 continue thread.
49 (process_serial_event) <Hg handling>: Also set thread_id if the
50 previous general thread is still alive.
51 (process_serial_event) <g/G handling>: If setting the current
52 thread to the general thread fails, error out.
53 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
54 thread's lwp instead of the current thread's.
55 * target.c (set_desired_thread): If the desired thread was not
56 found, leave the current thread pointing to NULL. Return an int
57 (boolean) indicating success.
58 * target.h (set_desired_thread): Change return type to int.
59
40045d91
MF
602015-08-20 Max Filippov <jcmvbkbc@gmail.com>
61
62 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
63 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
64 #includes.
65 (ps_get_thread_area): New function.
66
45face3b
GB
672015-08-19 Gary Benson <gbenson@redhat.com>
68
69 * hostio.c (handle_pread): Do not attempt to read more data
70 than hostio_reply_with_data can fit in a packet.
71
16d5f642
JB
722015-08-18 Joel Brobecker <brobecker@adacore.com>
73
74 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
75
a738da3a
MF
762015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
77
78 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
79
33ebda9d
PA
802015-08-06 Pedro Alves <palves@redhat.com>
81
82 * tracepoint.c (expr_eval_result): Now an int.
83
a44892be
PA
842015-08-06 Pedro Alves <palves@redhat.com>
85
86 * gdbthread.h (struct regcache): Forward declare.
87 (struct thread_info) <regcache_data>: Now a struct regcache
88 pointer.
89 * inferiors.c (inferior_regcache_data)
90 (set_inferior_regcache_data): Now work with struct regcache
91 pointers.
92 * inferiors.h (struct regcache): Forward declare.
93 (inferior_regcache_data, set_inferior_regcache_data): Now work
94 with struct regcache pointers.
95 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
96 (free_register_cache_thread): Remove struct regcache pointer
97 casts.
98
608a1e46
PA
992015-08-06 Pedro Alves <palves@redhat.com>
100
101 * server.c (captured_main): On error, print the exception message
102 to stderr, and if run_once is set, throw a quit.
103
f0ce0d3a
PA
1042015-08-06 Pedro Alves <palves@redhat.com>
105
106 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
107 the current thread.
108
bf47e248
PA
1092015-08-06 Pedro Alves <palves@redhat.com>
110
111 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
112 reading beyond the passed in buffer length.
113
b6b9ffcc
PL
1142015-08-06 Pierre Langlois <pierre.langlois@arm.com>
115
116 * tracepoint.c (symbol_list) <required>: Remove.
117
863d01bd
PA
1182015-08-06 Pedro Alves <palves@redhat.com>
119
120 * linux-low.c (handle_extended_wait): Set the fork child's suspend
121 count if stopping and suspending threads.
122 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
123 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
124 (linux_detach): Complete an ongoing step-over.
125 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
126 throughout.
127 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
128 (linux_wait_1): If passing a signal to the inferior after
129 finishing a step-over, unsuspend and re-resume all lwps. If we
130 see a single-step event but the thread should be continuing, don't
131 pass the trap to gdb.
132 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
133 internal_error instead of gdb_assert.
134 (enqueue_pending_signal): New function.
135 (check_ptrace_stopped_lwp_gone): Add debug output.
136 (start_step_over): Use internal_error instead of gdb_assert.
137 (complete_ongoing_step_over): New function.
138 (linux_resume_one_thread): Don't resume a suspended thread.
139 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
140 it stepping.
141
00db26fa
PA
1422015-08-06 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
145 (linux_thread_alive): Use lwp_is_marked_dead.
146 (extended_event_reported): Delete.
147 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
148 instead of extended_event_reported.
149 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
150 as well.
151 (lwp_is_marked_dead): New function.
152 (lwp_running): Use lwp_is_marked_dead.
153 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
154 comment.
155
ad071a30
PA
1562015-08-06 Pedro Alves <palves@redhat.com>
157
158 * linux-low.c (linux_wait_1): Move fork event output out of the
159 !report_to_gdb check. Pass event_child->waitstatus to
160 target_waitstatus_to_string instead of ourstatus.
161
524b57e6
YQ
1622015-08-04 Yao Qi <yao.qi@linaro.org>
163
164 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
165 if current_thread is 32 bit.
166
6085d6f6
YQ
1672015-08-04 Yao Qi <yao.qi@linaro.org>
168
169 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
170 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
171 * server.c (extended_protocol): Remove "static".
172 * server.h (extended_protocol): Declare it.
173
8a7e4587
YQ
1742015-08-04 Yao Qi <yao.qi@linaro.org>
175
176 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
177 both aarch64 and aarch32.
178 (aarch64_set_pc): Likewise.
179
3b53ae99
YQ
1802015-08-04 Yao Qi <yao.qi@linaro.org>
181
182 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
183 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
184 arm-with-neon.xml to srv_xmlfiles.
185 * linux-aarch64-low.c: Include linux-aarch32-low.h.
186 (is_64bit_tdesc): New function.
187 (aarch64_linux_read_description): New function.
188 (aarch64_arch_setup): Call aarch64_linux_read_description.
189 (regs_info): Rename to regs_info_aarch64.
190 (aarch64_regs_info): Return right regs_info.
191 (initialize_low_arch): Call initialize_low_arch_aarch32.
192
bd9e6534
YQ
1932015-08-04 Yao Qi <yao.qi@linaro.org>
194
195 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
196 * linux-aarch32-low.c: New file.
197 * linux-aarch32-low.h: New file.
198 * linux-arm-low.c (arm_fill_gregset): Move it to
199 linux-aarch32-low.c.
200 (arm_store_gregset): Likewise.
201 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
202 (arm_store_vfpregset): Call arm_store_vfpregset_num.
203 (arm_arch_setup): Check if PTRACE_GETREGSET works.
204 (regs_info): Rename to regs_info_arm.
205 (arm_regs_info): Return regs_info_aarch32 if
206 have_ptrace_getregset is 1 and target description is
207 arm_with_neon or arm_with_vfpv3.
208 (initialize_low_arch): Don't call init_registers_arm_with_neon.
209 Call initialize_low_arch_aarch32 instead.
210
ded48a5e
YQ
2112015-08-04 Yao Qi <yao.qi@linaro.org>
212
213 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
214 * linux-low.c: ... here.
215 * linux-low.h (have_ptrace_getregset): Declare it.
216
96e9210f
PA
2172015-08-04 Pedro Alves <palves@redhat.com>
218
219 * thread-db.c (struct thread_db): Use new typedefs.
220 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
221 CHK calls.
222 (disable_thread_event_reporting): Cast result of dlsym to
223 destination function pointer type.
224 (thread_db_mourn): Use td_ta_delete_ftype.
225
af60a1ef
SL
2262015-08-03 Sandra Loosemore <sandra@codesourcery.com>
227
228 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
229 arch variant.
230 (CDX_BREAKPOINT): Define for R2.
231 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
232 (the_low_target): Add comments.
233
e8b41681
YQ
2342015-07-30 Yao Qi <yao.qi@linaro.org>
235
236 * linux-arm-low.c (arm_hwcap): Remove it.
237 (arm_read_description): New local variable arm_hwcap. Don't
238 set arm_hwcap to zero.
239
89abb039
YQ
2402015-07-30 Yao Qi <yao.qi@linaro.org>
241
242 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
243 Use regcache->tdesc instead.
244 (arm_store_wmmxregset): Likewise.
245 (arm_fill_vfpregset): Likewise.
246 (arm_store_vfpregset): Likewise.
247
deca266c
YQ
2482015-07-30 Yao Qi <yao.qi@linaro.org>
249
250 * linux-arm-low.c: Include arch/arm.h.
251 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
252 (arm_store_gregset): Likewise.
253
aa58a496
SM
2542015-07-29 Simon Marchi <simon.marchi@ericsson.com>
255
256 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
257 ptrace's 4th parameter.
258
50904b25
YQ
2592015-07-27 Yao Qi <yao.qi@linaro.org>
260
261 * configure.srv (case aarch64*-*-linux*): Don't set
262 srv_linux_usrregs.
263
5826e159
PA
2642015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
265
266 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
267 sys/ptrace.h.
268 * linux-arm-low.c: Likewise.
269 * linux-cris-low.c: Likewise.
270 * linux-crisv32-low.c: Likewise.
271 * linux-low.c: Likewise.
272 * linux-m68k-low.c: Likewise.
273 * linux-mips-low.c: Likewise.
274 * linux-nios2-low.c: Likewise.
275 * linux-s390-low.c: Likewise.
276 * linux-sparc-low.c: Likewise.
277 * linux-tic6x-low.c: Likewise.
278 * linux-tile-low.c: Likewise.
279 * linux-x86-low.c: Likewise.
280
54019719
PA
2812015-07-24 Pedro Alves <palves@redhat.com>
282
283 * config.in: Regenerate.
284 * configure: Regenerate.
285
eb7aa561
PA
2862015-07-24 Pedro Alves <palves@redhat.com>
287
288 * acinclude.m4: Include ../ptrace.m4.
289 * configure.ac: Call GDB_AC_PTRACE.
290 * config.in, configure: Regenerate.
291
55d7b841
YQ
2922015-07-24 Yao Qi <yao.qi@linaro.org>
293
294 * linux-low.c (linux_create_inferior): Remove setting to
295 proc->priv->new_inferior.
296 (linux_attach): Likewise.
297 (linux_low_filter_event): Likewise.
298 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
299
c06cbd92
YQ
3002015-07-24 Yao Qi <yao.qi@linaro.org>
301
302 * linux-low.c (linux_arch_setup): New function.
303 (linux_low_filter_event): If proc->tdesc is NULL and
304 proc->attached is true, call the_low_target.arch_setup.
305 Otherwise, keep status pending, and return.
306 (linux_resume_one_lwp_throw): Don't call get_pc if
307 thread->while_stepping isn't NULL. Don't call
308 get_thread_regcache if proc->tdesc is NULL.
309 (need_step_over_p): Return 0 if proc->tdesc is NULL.
310 (linux_target_ops): Install arch_setup.
311 * server.c (start_inferior): Call the_target->arch_setup.
312 * target.h (struct target_ops) <arch_setup>: New field.
313 (target_arch_setup): New marco.
314 * lynx-low.c (lynx_target_ops): Update.
315 * nto-low.c (nto_target_ops): Update.
316 * spu-low.c (spu_target_ops): Update.
317 * win32-low.c (win32_target_ops): Update.
318
5ae3ebba
YQ
3192015-07-24 Yao Qi <yao.qi@linaro.org>
320
321 * linux-low.c (linux_add_process): Don't set
322 proc->priv->new_inferior.
323 (linux_create_inferior): Set proc->priv->new_inferior to 1.
324 (linux_attach): Likewise.
325
eb97750b
YQ
3262015-07-24 Yao Qi <yao.qi@linaro.org>
327
328 * server.c (start_inferior): Code refactor.
329
51aee833
YQ
3302015-07-24 Yao Qi <yao.qi@linaro.org>
331
332 * server.c (process_serial_event): Set general_thread.
333
af1b22f3
YQ
3342015-07-21 Yao Qi <yao.qi@linaro.org>
335
336 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
337 aarch64_linux_get_debug_reg_capacity.
338
554717a3
YQ
3392015-07-17 Yao Qi <yao.qi@linaro.org>
340
341 * Makefile.in (aarch64-linux-hw-point.o): New rule.
342 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
343 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
344 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
345 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
346 (AARCH64_HWP_ALIGNMENT): Likewise.
347 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
348 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
349 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
350 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
351 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
352 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
353 (struct aarch64_debug_reg_state): Likewise.
354 (struct arch_lwp_info): Likewise.
355 (aarch64_align_watchpoint): Likewise.
356 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
357 (aarch64_watchpoint_length): Likewise.
358 (aarch64_point_encode_ctrl_reg): Likewise
359 (aarch64_point_is_aligned): Likewise.
360 (aarch64_align_watchpoint): Likewise.
361 (aarch64_linux_set_debug_regs):
362 (aarch64_dr_state_insert_one_point): Likewise.
363 (aarch64_dr_state_remove_one_point): Likewise.
364 (aarch64_handle_breakpoint): Likewise.
365 (aarch64_handle_aligned_watchpoint): Likewise.
366 (aarch64_handle_unaligned_watchpoint): Likewise.
367 (aarch64_handle_watchpoint): Likewise.
368
c67ca4de
YQ
3692015-07-17 Yao Qi <yao.qi@linaro.org>
370
371 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
372 and don't aarch64_get_debug_reg_state. All callers update.
373 (aarch64_handle_aligned_watchpoint): Likewise.
374 (aarch64_handle_unaligned_watchpoint): Likewise.
375 (aarch64_handle_watchpoint): Likewise.
376 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
377 (aarch64_remove_point): Likewise.
378
25abf979
YQ
3792015-07-17 Yao Qi <yao.qi@linaro.org>
380
381 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
382 debug_printf.
383 (aarch64_handle_unaligned_watchpoint): Likewise.
384
db1ff28b
JK
3852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
386
387 Revert the previous 3 commits:
388 Move gdb_regex* to common/
389 Move linux_find_memory_regions_full & co.
390 gdbserver build-id attribute generator
391
700ca40f
JK
3922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
393 Jan Kratochvil <jan.kratochvil@redhat.com>
394
395 gdbserver build-id attribute generator.
396 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
397 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
398 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
399 (find_phdr): New.
400 (get_dynamic): Use find_pdhr to traverse program headers.
401 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
402 (compare_mapping_entry_range, struct find_memory_region_callback_data)
403 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
404 (get_hex_build_id): New.
405 (linux_qxfer_libraries_svr4): Add optional build-id attribute
406 to reply XML document.
407
9904185c
JK
4082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
409 Jan Kratochvil <jan.kratochvil@redhat.com>
410
411 * target.c: Include target/target-utils.h and fcntl.h.
412 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
413 (target_fileio_read_stralloc): New functions.
414
6e5b4429
JK
4152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
416
417 * Makefile.in (OBS): Add gdb_regex.o.
418 (gdb_regex.o): New.
419 * config.in: Rebuilt.
420 * configure: Rebuilt.
421
ddc98fbf
JK
4222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
423 Jan Kratochvil <jan.kratochvil@redhat.com>
424
425 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
426 * Makefile.in (OBS): Add target-utils.o.
427 (linux-maps.o, target-utils.o): New.
428 * configure.srv (srv_linux_obj): Add linux-maps.o.
429
e57bb7a0
PL
4302015-07-15 Pierre Langlois <pierre.langlois@arm.com>
431
432 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
433 function, return 1.
434 (the_low_target): Install it.
435
586b02a9
PA
4362015-07-14 Pedro Alves <palves@redhat.com>
437
438 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
439 Instead, ignore ECHILD, and throw an error for other errnos.
440
58c1b36c
PA
4412015-07-10 Pedro Alves <palves@redhat.com>
442
443 * event-loop.c (struct callback_event) <data>: Change type to
444 gdb_client_data instance instead of gdb_client_data pointer.
445 (append_callback_event): Adjust.
446
421530db
PL
4472015-07-10 Pierre Langlois <pierre.langlois@arm.com>
448
449 * linux-aarch64-low.c: Add comments for each linux_target_ops
450 method. Remove comments already covered in target_ops and
451 linux_target_ops definitions.
452 (the_low_target): Add comments for each unimplemented method.
453
c2d65f38
YQ
4542015-07-09 Yao Qi <yao.qi@linaro.org>
455
456 * linux-aarch64-low.c (aarch64_regmap): Remove.
457 (aarch64_usrregs_info): Remove.
458 (regs_info): Set field usrregs to NULL.
459
b20a6524
MM
4602015-07-02 Markus Metzger <markus.t.metzger@intel.com>
461
462 * linux-low.c: Include "rsp-low.h"
463 (linux_low_encode_pt_config, linux_low_encode_raw): New.
464 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
465 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
466 (handle_btrace_enable_pt): New.
467 (handle_btrace_general_set): Support "pt".
468 (handle_btrace_conf_general_set): Support "pt:size".
469
96c97461
PL
4702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
471
472 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
473 Z_PACKET_SW_BP.
474
37d66942
PL
4752015-06-29 Pierre Langlois <pierre.langlois@arm.com>
476
477 * linux-aarch64-low.c: Remove comment about endianness.
478 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
479 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
480 memcmp.
481
dc06243f
GB
4822015-06-24 Gary Benson <gbenson@redhat.com>
483
484 * linux-i386-ipa.c (stdint.h): Do not include.
485 * lynx-i386-low.c (stdint.h): Likewise.
486 * lynx-ppc-low.c (stdint.h): Likewise.
487 * mem-break.c (stdint.h): Likewise.
488 * thread-db.c (stdint.h): Likewise.
489 * tracepoint.c (stdint.h): Likewise.
490 * win32-low.c (stdint.h): Likewise.
491
124e13d9
SM
4922015-06-18 Simon Marchi <simon.marchi@ericsson.com>
493
494 * server.c (write_qxfer_response): Update call to
495 remote_escape_output.
496
909c2cda
JK
4972015-06-15 Aleksandar Ristovski <aristovski@qnx.com
498 Jan Kratochvil <jan.kratochvil@redhat.com>
499
500 Merge multiple hex conversions.
501 * gdbreplay.c (tohex): Rename to 'fromhex'.
502 (logchar): Use fromhex.
503
24c05f46
JK
5042015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
505
506 * server.c (handle_qxfer_libraries): Set `version' attribute for
507 <library-list>.
508
14d2069a
GB
5092015-06-10 Gary Benson <gbenson@redhat.com>
510
511 * target.h (struct target_ops) <multifs_open>: New field.
512 <multifs_unlink>: Likewise.
513 <multifs_readlink>: Likewise.
514 * linux-low.c (nat/linux-namespaces.h): New include.
515 (linux_target_ops): Initialize the_target->multifs_open,
516 the_target->multifs_unlink and the_target->multifs_readlink.
517 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
518 * hostio.c (hostio_fs_pid): New static variable.
519 (hostio_handle_new_gdb_connection): New function.
520 (handle_setfs): Likewise.
521 (handle_open): Use the_target->multifs_open as appropriate.
522 (handle_unlink): Use the_target->multifs_unlink as appropriate.
523 (handle_readlink): Use the_target->multifs_readlink as
524 appropriate.
525 (handle_vFile): Handle vFile:setfs packets.
526 * server.c (handle_query): Call hostio_handle_new_gdb_connection
527 after target_handle_new_gdb_connection.
528
4b8b5e72
GB
5292015-06-10 Gary Benson <gbenson@redhat.com>
530
531 * configure.ac (AC_CHECK_FUNCS): Add setns.
532 * config.in: Regenerate.
533 * configure: Likewise.
534 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
535 (linux-namespaces.o): New rule.
536 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
537
3ac2e371
GB
5382015-06-09 Gary Benson <gbenson@redhat.com>
539
540 * hostio.c (handle_open): Process mode argument with
541 fileio_to_host_mode.
542
ca9b78ce
YQ
5432015-06-01 Yao Qi <yao.qi@linaro.org>
544
545 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
546 * linux-x86-low.c: Likewise.
547
bfacd19d
DB
5482015-05-28 Don Breazeal <donb@codesourcery.com>
549
550 * linux-low.c (handle_extended_wait): Initialize
551 thread_info.last_resume_kind for new fork children.
552
452003ef
PA
5532015-05-15 Pedro Alves <palves@redhat.com>
554
555 * target.h (target_handle_new_gdb_connection): Rewrite using if
556 wrapped in do/while.
557
1041a03c
JB
5582015-05-14 Joel Brobecker <brobecker@adacore.com>
559
560 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
561 * configure, config.in: Regenerate.
562 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
563 Declare typedef.
564
c269dbdb
DB
5652015-05-12 Don Breazeal <donb@codesourcery.com>
566
567 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
568 PTRACE_EVENT_VFORK_DONE.
569 (linux_low_ptrace_options, extended_event_reported): Add vfork
570 events.
571 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
572 and "vforkdone" for RSP 'T' Stop Reply Packet.
573 * server.h (report_vfork_events): Declare
574 global variable.
575
3a8a0396
DB
5762015-05-12 Don Breazeal <donb@codesourcery.com>
577
578 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
579 (the_low_target) <new_fork>: Initialize new member.
580 * linux-arm-low.c (arm_new_fork): New function.
581 (the_low_target) <new_fork>: Initialize new member.
582 * linux-low.c (handle_extended_wait): Call new target function
583 new_fork.
584 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
585 * linux-mips-low.c (mips_add_watchpoint): New function
586 extracted from mips_insert_point.
587 (the_low_target) <new_fork>: Initialize new member.
588 (mips_linux_new_fork): New function.
589 (mips_insert_point): Call mips_add_watchpoint.
590 * linux-x86-low.c (x86_linux_new_fork): New function.
591 (the_low_target) <new_fork>: Initialize new member.
592
de0d863e
DB
5932015-05-12 Don Breazeal <donb@codesourcery.com>
594
595 * linux-low.c (handle_extended_wait): Implement return value,
596 rename argument 'event_child' to 'event_lwp', handle
597 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
598 (linux_low_ptrace_options): New function.
599 (linux_low_filter_event): Call linux_low_ptrace_options,
600 use different argument fo linux_enable_event_reporting,
601 use return value from handle_extended_wait.
602 (extended_event_reported): New function.
603 (linux_wait_1): Call extended_event_reported and set
604 status to report fork events.
605 (linux_write_memory): Add pid to debug message.
606 (reset_lwp_ptrace_options_callback): New function.
607 (linux_handle_new_gdb_connection): New function.
608 (linux_target_ops): Initialize new structure member.
609 * linux-low.h (struct lwp_info) <waitstatus>: New member.
610 * lynx-low.c: Initialize new structure member.
611 * remote-utils.c (prepare_resume_reply): Implement stop reason
612 "fork" for "T" stop message.
613 * server.c (handle_query): Call handle_new_gdb_connection.
614 * server.h (report_fork_events): Declare global flag.
615 * target.h (struct target_ops) <handle_new_gdb_connection>:
616 New member.
617 (target_handle_new_gdb_connection): New macro.
618 * win32-low.c: Initialize new structure member.
619
ddcbc397
DB
6202015-05-12 Don Breazeal <donb@codesourcery.com>
621
622 * mem-break.c (APPEND_TO_LIST): Define macro.
623 (clone_agent_expr): New function.
624 (clone_one_breakpoint): New function.
625 (clone_all_breakpoints): New function.
626 * mem-break.h: Declare new functions.
627
89245bc0
DB
6282015-05-12 Don Breazeal <donb@codesourcery.com>
629
630 * linux-low.c (linux_supports_fork_events): New function.
631 (linux_supports_vfork_events): New function.
632 (linux_target_ops): Initialize new structure members.
633 (initialize_low): Call linux_check_ptrace_features.
634 * lynx-low.c (lynx_target_ops): Initialize new structure
635 members.
636 * server.c (report_fork_events, report_vfork_events):
637 New global flags.
638 (handle_query): Add new features to qSupported packet and
639 response.
640 (captured_main): Initialize new global variables.
641 * target.h (struct target_ops) <supports_fork_events>:
642 New member.
643 <supports_vfork_events>: New member.
644 (target_supports_fork_events): New macro.
645 (target_supports_vfork_events): New macro.
646 * win32-low.c (win32_target_ops): Initialize new structure
647 members.
648
835205d0
GB
6492015-05-12 Gary Benson <gbenson@redhat.com>
650
651 * server.c (handle_qxfer_exec_file): Use current process
652 if annex is empty.
653
21e94bd9
SL
6542015-05-08 Sandra Loosemore <sandra@codesourcery.com>
655
656 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
657 Remove HAVE_PTRACE_GETREGS conditionals.
658 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
659 instead of PTRACE_GETREGS and PTRACE_SETREGS.
660
45614f15
YQ
6612015-05-08 Yao Qi <yao.qi@linaro.org>
662
663 * linux-low.c (linux_supports_conditional_breakpoints): New
664 function.
665 (linux_target_ops): Install new target method.
666 * lynx-low.c (lynx_target_ops): Install NULL hook for
667 supports_conditional_breakpoints.
668 * nto-low.c (nto_target_ops): Likewise.
669 * spu-low.c (spu_target_ops): Likewise.
670 * win32-low.c (win32_target_ops): Likewise.
671 * server.c (handle_query): Check
672 target_supports_conditional_breakpoints.
673 * target.h (struct target_ops) <supports_conditional_breakpoints>:
674 New field.
675 (target_supports_conditional_breakpoints): New macro.
676
80ad801e
PA
6772015-05-06 Pedro Alves <palves@redhat.com>
678
679 PR server/18081
680 * server.c (start_inferior): If the process exits, mourn it.
681
819843c7
GB
6822015-04-21 Gary Benson <gbenson@redhat.com>
683
684 * hostio.c (fileio_open_flags_to_host): Factored out to
685 fileio_to_host_openflags in common/fileio.c. Single use
686 updated.
687
a2d5a9d7
MF
6882015-04-17 Max Filippov <jcmvbkbc@gmail.com>
689
690 * linux-xtensa-low.c (xtensa_fill_gregset)
691 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
692 XCHAL_HAVE_LOOP.
693
deb44829
MF
6942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
695
696 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
697 (regs_info): Replace usrregs pointer with NULL.
698
e57f1de3
GB
6992015-04-17 Gary Benson <gbenson@redhat.com>
700
701 * target.h (struct target_ops) <pid_to_exec_file>: New field.
702 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
703 * server.c (handle_qxfer_exec_file): New function.
704 (qxfer_packets): Add exec-file entry.
705 (handle_query): Report qXfer:exec-file:read as supported packet.
706
62828379
RN
7072015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
708
709 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
710
b88bb450
GB
7112015-04-09 Gary Benson <gbenson@redhat.com>
712
713 * hostio-errno.c (errno_to_fileio_error): Remove function.
714 Update caller to use remote_fileio_to_fio_error.
715
c8f4bfdd
YQ
7162015-04-09 Yao Qi <yao.qi@linaro.org>
717
718 * linux-low.c (linux_insert_point): Call
719 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
720 (linux_remove_point): Call remove_memory_breakpoint if type is
721 raw_bkpt_type_sw.
722 * linux-x86-low.c (x86_insert_point): Don't call
723 insert_memory_breakpoint.
724 (x86_remove_point): Don't call remove_memory_breakpoint.
725
41f98f02
PA
7262015-04-01 Pedro Alves <palves@redhat.com>
727 Cleber Rosa <crosa@redhat.com>
728
729 * server.c (gdbserver_usage): Reorganize and extend the usage
730 message.
731
2bf6fb9d
PA
7322015-03-24 Pedro Alves <palves@redhat.com>
733
734 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
735 output. Also dump TRAP_TRACE.
736 (linux_low_filter_event): In debug output, distinguish a
737 resume_stop SIGSTOP from a delayed SIGSTOP.
738
369f6daa
GB
7392015-03-24 Gary Benson <gbenson@redhat.com>
740
741 * linux-x86-low.c (x86_linux_new_thread): Moved to
742 nat/x86-linux.c.
743 (x86_linux_prepare_to_resume): Likewise.
744
8e5d4070
GB
7452015-03-24 Gary Benson <gbenson@redhat.com>
746
747 * Makefile.in (x86-linux-dregs.o): New rule.
748 * configure.srv: Add x86-linux-dregs.o to relevant targets.
749 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
750 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
751 (x86_linux_dr_get): Likewise.
752 (x86_linux_dr_set): Likewise.
753 (update_debug_registers_callback): Likewise.
754 (x86_linux_dr_set_addr): Likewise.
755 (x86_linux_dr_get_addr): Likewise.
756 (x86_linux_dr_set_control): Likewise.
757 (x86_linux_dr_get_control): Likewise.
758 (x86_linux_dr_get_status): Likewise.
759 (x86_linux_update_debug_registers): Likewise.
760
2b95d440
GB
7612015-03-24 Gary Benson <gbenson@redhat.com>
762
763 * linux-x86-low.c (x86_linux_update_debug_registers):
764 New function, factored out from...
765 (x86_linux_prepare_to_resume): ...this.
766
14b0bc68
GB
7672015-03-24 Gary Benson <gbenson@redhat.com>
768
769 * linux-x86-low.c (x86_linux_dr_get): Update comments.
770 (x86_linux_dr_set): Likewise.
771 (update_debug_registers_callback): Likewise.
772 (x86_linux_dr_set_addr): Likewise.
773 (x86_linux_dr_get_addr): Likewise.
774 (x86_linux_dr_set_control): Likewise.
775 (x86_linux_dr_get_control): Likewise.
776 (x86_linux_dr_get_status): Likewise.
777 (x86_linux_prepare_to_resume): Likewise.
778
5dfe6ca8
GB
7792015-03-24 Gary Benson <gbenson@redhat.com>
780
781 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
782 Use perror_with_name. Pass string through gettext.
783 (x86_linux_dr_set): Likewise.
784
d33472ad
GB
7852015-03-24 Gary Benson <gbenson@redhat.com>
786
787 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
788 (x86_linux_dr_set_addr): ...this.
789 (x86_dr_low_get_addr): Rename to...
790 (x86_linux_dr_get_addr): ...this.
791 (x86_dr_low_set_control): Rename to...
792 (x86_linux_dr_set_control): ...this.
793 (x86_dr_low_get_control): Rename to...
794 (x86_linux_dr_get_control): ...this.
795 (x86_dr_low_get_status): Rename to...
796 (x86_linux_dr_get_status): ...this.
797 (x86_dr_low): Update with new function names.
798
4b134ca1
GB
7992015-03-24 Gary Benson <gbenson@redhat.com>
800
801 * Makefile.in (x86-linux.o): New rule.
802 * configure.srv: Add x86-linux.o to relevant targets.
803 * linux-low.c (lwp_set_arch_private_info): New function.
804 (lwp_arch_private_info): Likewise.
805 * linux-x86-low.c: Include nat/x86-linux.h.
806 (arch_lwp_info): Removed structure.
807 (update_debug_registers_callback):
808 Use lwp_set_debug_registers_changed.
809 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
810 and lwp_set_debug_registers_changed.
811 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
812
34c703da
GB
8132015-03-24 Gary Benson <gbenson@redhat.com>
814
815 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
816 * linux-arm-low.c (arm_new_thread): Likewise.
817 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
818 * linux-mips-low.c (mips_linux_new_thread): Likewise.
819 * linux-x86-low.c (x86_linux_new_thread): Likewise.
820 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
821
cff068da
GB
8222015-03-24 Gary Benson <gbenson@redhat.com>
823
824 * linux-low.c (ptid_of_lwp): New function.
825 (lwp_is_stopped): Likewise.
826 (lwp_stop_reason): Likewise.
827 * linux-x86-low.c (update_debug_registers_callback):
828 Use lwp_is_stopped.
829 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
830 lwp_stop_reason.
831
b2f7c7e8
GB
8322015-03-24 Gary Benson <gbenson@redhat.com>
833
834 * linux-low.h (linux_stop_lwp): Remove declaration.
835
6d4ee8c6
GB
8362015-03-24 Gary Benson <gbenson@redhat.com>
837
838 * linux-low.h: Include nat/linux-nat.h.
839 * linux-low.c (iterate_over_lwps_args): New structure.
840 (iterate_over_lwps_filter): New function.
841 (iterate_over_lwps): Likewise.
842 * linux-x86-low.c (update_debug_registers_callback):
843 Update signature to what iterate_over_lwps expects.
844 Remove PID check that iterate_over_lwps now performs.
845 (x86_dr_low_set_addr): Use iterate_over_lwps.
846 (x86_dr_low_set_control): Likewise.
847
70a0bb6b
GB
8482015-03-24 Gary Benson <gbenson@redhat.com>
849
850 * linux-x86-low.c (x86_debug_reg_state): New function.
851 (x86_linux_prepare_to_resume): Use the above.
852
7b669087
GB
8532015-03-24 Gary Benson <gbenson@redhat.com>
854
855 * linux-low.c (current_lwp_ptid): New function.
856 * linux-x86-low.c: Include nat/linux-nat.h.
857 (x86_dr_low_get_addr): Use current_lwp_ptid.
858 (x86_dr_low_get_control): Likewise.
859 (x86_dr_low_get_status): Likewise.
860
eef49a3d
PA
8612015-03-20 Pedro Alves <palves@redhat.com>
862
863 * tracepoint.c (cmd_qtstatus): Make "str" const.
864
b2333d22
PA
8652015-03-20 Pedro Alves <palves@redhat.com>
866
867 * server.c (handle_general_set): Make "req_str" const.
868
23f238d3
PA
8692015-03-19 Pedro Alves <palves@redhat.com>
870
871 * linux-low.c (linux_resume_one_lwp): Rename to ...
872 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
873 instead call perror_with_name.
874 (check_ptrace_stopped_lwp_gone): New function.
875 (linux_resume_one_lwp): Reimplement as wrapper around
876 linux_resume_one_lwp_throw that swallows errors if the LWP is
877 gone.
878
91baf43f
PA
8792015-03-19 Pedro Alves <palves@redhat.com>
880
881 * linux-low.c (count_events_callback, select_event_lwp_callback):
882 No longer check whether the thread has resume_stop as last resume
883 kind.
884
8bf3b159
PA
8852015-03-19 Pedro Alves <palves@redhat.com>
886
887 * linux-low.c (count_events_callback, select_event_lwp_callback):
888 Use the lwp's status_pending_p field, not the thread's.
889
b90fc188
PA
8902015-03-19 Pedro Alves <palves@redhat.com>
891
892 * linux-low.c (select_event_lwp_callback): Update comments to
893 no longer mention SIGTRAP.
894
464b0089
GB
8952015-03-18 Gary Benson <gbenson@redhat.com>
896
897 * server.c (handle_query): Do not report vFile:fstat as supported.
898
aa9e327f
GB
8992015-03-11 Gary Benson <gbenson@redhat.com>
900
901 * hostio.c (sys/types.h): New include.
902 (sys/stat.h): Likewise.
903 (common-remote-fileio.h): Likewise.
904 (handle_fstat): New function.
905 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 906
791c0056
GB
9072015-03-11 Gary Benson <gbenson@redhat.com>
908
909 * configure.ac (AC_CHECK_MEMBERS): Add checks for
910 struct stat.st_blocks and struct stat.st_blksize.
911 * configure: Regenerate.
912 * config.in: Likewise.
913 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
914 (OBS): Add common-remote-fileio.o.
915 (common-remote-fileio.o): New rule.
916
9a9df970
PA
9172015-03-09 Pedro Alves <palves@redhat.com>
918
919 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
920 'struct sockaddr' pointer in 'accept' call.
921
9eb1356e
PA
9222015-03-09 Pedro Alves <palves@redhat.com>
923
924 Revert:
925 2015-03-07 Pedro Alves <palves@redhat.com>
926 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
927 or <winsock2.h> here. Instead include "gdb_socket.h".
928 (remote_open): Use union gdb_sockaddr_u.
929 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
930 or <winsock2.h> here. Instead include "gdb_socket.h".
931 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
932 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
933 or <sys/un.h>.
934 (init_named_socket, gdb_agent_helper_thread): Use union
935 gdb_sockaddr_u.
936
aac331e4
PA
9372015-03-07 Pedro Alves <palves@redhat.com>
938
939 * configure.ac (build_warnings): Move
940 -Wdeclaration-after-statement to the C-specific set.
941 * configure: Regenerate.
942
366c75fc
PA
9432015-03-07 Pedro Alves <palves@redhat.com>
944
945 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
946 or <winsock2.h> here. Instead include "gdb_socket.h".
947 (remote_open): Use union gdb_sockaddr_u.
948 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
949 or <winsock2.h> here. Instead include "gdb_socket.h".
950 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
951 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
952 or <sys/un.h>.
953 (init_named_socket, gdb_agent_helper_thread): Use union
954 gdb_sockaddr_u.
955
492d29ea
PA
9562015-03-07 Pedro Alves <palves@redhat.com>
957
958 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
959 instead.
960
60a191ed
YQ
9612015-03-06 Yao Qi <yao.qi@linaro.org>
962
963 * linux-aarch64-low.c (aarch64_insert_point): Use
964 show_debug_regs as a boolean.
965 (aarch64_remove_point): Likewise.
966
f5771b1d
PA
9672015-03-05 Pedro Alves <palves@redhat.com>
968
969 * lynx-low.c (lynx_target_ops): Install NULL hooks for
970 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
971 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
972 * nto-low.c (nto_target_ops): Likewise.
973 * spu-low.c (spu_target_ops): Likewise.
974 * win32-low.c (win32_target_ops): Likewise.
975
3e572f71
PA
9762015-03-04 Pedro Alves <palves@redhat.com>
977
72f4393d 978 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
979 Decide whether a breakpoint triggered based on the SIGTRAP's
980 siginfo.si_code.
72f4393d
L
981 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
982 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
983 (linux_low_filter_event): Check for breakpoints before checking
984 watchpoints.
985 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
986 siginfo.si_code.
72f4393d
L
987 (linux_stopped_by_sw_breakpoint)
988 (linux_supports_stopped_by_sw_breakpoint)
989 (linux_stopped_by_hw_breakpoint)
990 (linux_supports_stopped_by_hw_breakpoint): New functions.
991 (linux_target_ops): Install new target methods.
3e572f71 992
1ec68e26
PA
9932015-03-04 Pedro Alves <palves@redhat.com>
994
995 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
996 * server.c (swbreak_feature, hwbreak_feature): New globals.
997 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
998 (captured_main): Clear swbreak_feature and hwbreak_feature.
999 * server.h (swbreak_feature, hwbreak_feature): Declare.
1000 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1001 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1002 supports_stopped_by_hw_breakpoint>: New fields.
1003 (target_supports_stopped_by_sw_breakpoint)
1004 (target_stopped_by_sw_breakpoint)
1005 (target_supports_stopped_by_hw_breakpoint)
1006 (target_stopped_by_hw_breakpoint): Declare.
1007
15c66dd6
PA
10082015-03-04 Pedro Alves <palves@redhat.com>
1009
1010 enum lwp_stop_reason -> enum target_stop_reason
1011 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1012 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1013 (linux_wait_1, stuck_in_jump_pad_callback)
1014 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1015 (linux_stopped_by_watchpoint):
1016 * linux-low.h (enum lwp_stop_reason): Delete.
1017 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1018 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1019
98fc70d6
YQ
10202015-03-04 Yao Qi <yao.qi@linaro.org>
1021
1022 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1023
dd2ac174
GB
10242015-03-03 Gary Benson <gbenson@redhat.com>
1025
1026 * hostio.c (handle_vFile): Fix prefix lengths.
1027
d68e53f4
MM
10282015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1029
1030 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1031 ptr_bits.
1032
bf2d68ab
AA
10332015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1034
1035 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1036 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1037 (clean): Add "rm -f" for above C files.
1038 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1039 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1040 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1041 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1042 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1043 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1044 (init_registers_s390x_vx_linux64)
1045 (init_registers_s390x_tevx_linux64)
1046 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1047 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1048 declarations.
1049 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1050 (s390_store_vxrs_high): New functions.
1051 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1052 NT_S390_VXRS_HIGH.
1053 (s390_arch_setup): Add logic for selecting one of the new target
1054 descriptions. Activate the new vector regsets if applicable.
1055 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1056 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1057 and init_registers_s390x_tevx_linux64.
1058
c966a859
PA
10592015-03-01 Pedro Alves <palves@redhat.com>
1060
1061 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1062 parameter.
1063
4180215b
PA
10642015-02-27 Pedro Alves <palves@redhat.com>
1065
1066 * linux-x86-low.c (u_debugreg_offset): New function.
1067 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1068
749bab01
PA
10692015-02-27 Pedro Alves <palves@redhat.com>
1070
1071 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1072 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1073 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1074 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1075 (ps_lsetfpregs, ps_getpid)
1076 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1077 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1078 (ps_lsetxregs, ps_plog): Declare.
1079
3c14e5a3
PA
10802015-02-27 Pedro Alves <palves@redhat.com>
1081
1082 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1083 IP_AGENT_EXPORT_FUNC.
1084 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1085 IP_AGENT_EXPORT_FUNC.
1086 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1087 (IP_AGENT_EXPORT): Delete.
1088 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1089 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1090 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1091 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1092 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1093 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1094 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1095 (traceframe_read_count, traceframe_write_count)
1096 (traceframes_created, trace_state_variables, get_raw_reg)
1097 (get_trace_state_variable_value, set_trace_state_variable_value)
1098 (ust_loaded, helper_thread_id, cmd_buf): Use
1099 IPA_SYM_EXPORTED_NAME.
1100 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1101 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1102 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1103 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1104 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1105 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1106 EXTERN_C_PUSH/EXTERN_C_POP.
1107 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1108 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1109 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1110 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1111 (traceframe_write_count, traceframe_read_count)
1112 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1113 (about_to_request_buffer_space, get_trace_state_variable_value)
1114 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1115 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1116 EXTERN_C_PUSH/EXTERN_C_POP.
1117 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1118 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1119 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1120 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1121 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1122 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1123 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1124 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1125 Define.
1126 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1127 (IP_AGENT_EXPORT_VAR_DECL): Define.
1128 (tracing): Declare.
1129 (gdb_agent_get_raw_reg): Declare.
1130
fe978cb0
PA
11312015-02-27 Tom Tromey <tromey@redhat.com>
1132 Pedro Alves <palves@redhat.com>
1133
1134 Rename symbols whose names are reserved C++ keywords throughout.
1135
3bc3d82a
PA
11362015-02-27 Pedro Alves <palves@redhat.com>
1137
1138 * Makefile.in (COMPILER): New, get it from autoconf.
1139 (CXX): Get from autoconf instead.
1140 (COMPILE.pre): Use COMPILER.
1141 (CC-LD): Rename to ...
1142 (CC_LD): ... this. Use COMPILER.
1143 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1144 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1145 * acinclude.m4: Include build-with-cxx.m4.
1146 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1147 Disable -Werror by default if building in C++ mode.
1148 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1149 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1150 the C++ compiler. Save/restore CXXFLAGS too.
1151 * configure: Regenerate.
1152
07697489
PA
11532015-02-27 Pedro Alves <palves@redhat.com>
1154
1155 * acinclude.m4: Include libiberty.m4.
1156 * configure.ac: Call libiberty_INIT.
1157 * config.in, configure: Regenerate.
1158
9beb7c4e
PA
11592015-02-26 Pedro Alves <palves@redhat.com>
1160
1161 * linux-low.c (linux_wait_1): When incrementing the PC past a
1162 program breakpoint always use the_low_target.breakpoint_len as
1163 increment, rather than the maximum between that and
1164 the_low_target.decr_pc_after_break.
1165
8090aef2
PA
11662015-02-23 Pedro Alves <palves@redhat.com>
1167
1168 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1169 thread was doing a step-over; always adjust the PC if
1170 we stepped over a permanent breakpoint.
1171 (linux_wait_1): If we stepped over breakpoint that was on top of a
1172 permanent breakpoint, manually advance the PC past it.
1173
bc9540e8
PA
11742015-02-23 Pedro Alves <palves@redhat.com>
1175
1176 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1177 modes.
1178 (x86_fill_gregset, x86_store_gregset): Use it when handling
1179 $orig_eax.
1180
2db9a427
PA
11812015-02-20 Pedro Alves <palves@redhat.com>
1182
1183 * thread-db.c: Include "nat/linux-procfs.h".
1184 (thread_db_init): Skip listing new threads if the kernel supports
1185 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1186
afa8d396
PA
11872015-02-20 Pedro Alves <palves@redhat.com>
1188
1189 * linux-low.c (status_pending_p_callback): Use ptid_match.
1190
c9587f88
AT
11912015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1192
1193 PR breakpoints/16812
1194 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1195 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1196 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1197
b05ec7a5
AT
11982015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1199
1200 PR breakpoints/15956
1201 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1202
d33501a5
MM
12032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1204
1205 * linux-low.c (linux_low_btrace_conf): Print size.
1206 * server.c (handle_btrace_conf_general_set): New.
1207 (hanle_general_set): Call handle_btrace_conf_general_set.
1208 (handle_query): Report Qbtrace-conf:bts:size as supported.
1209
f4abbc16
MM
12102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1211
1212 * linux-low.c (linux_low_enable_btrace): Update parameters.
1213 (linux_low_btrace_conf): New.
1214 (linux_target_ops)<to_btrace_conf>: Initialize.
1215 * server.c (current_btrace_conf): New.
1216 (handle_btrace_enable): Rename to ...
1217 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1218 to target_enable_btrace. Update comment. Update users.
1219 (handle_qxfer_btrace_conf): New.
1220 (qxfer_packets): Add btrace-conf entry.
1221 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1222 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1223 (target_ops)<read_btrace_conf>: New.
1224 (target_enable_btrace): Update parameters.
1225 (target_read_btrace_conf): New.
1226
043c3577
MM
12272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1228
1229 * server.c (handle_btrace_general_set): Remove call to
1230 target_supports_btrace.
1231 (supported_btrace_packets): New.
1232 (handle_query): Call supported_btrace_packets.
1233 * target.h: include btrace-common.h.
1234 (btrace_target_info): Removed.
1235 (supports_btrace, target_supports_btrace): Update parameters.
1236
734b0e4b
MM
12372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1238
1239 * Makefile.in (SFILES): Add common/btrace-common.c.
1240 (OBS): Add common/btrace-common.o.
1241 (btrace-common.o): Add build rules.
1242 * linux-low: Include btrace-common.h.
1243 (linux_low_read_btrace): Use struct btrace_data. Call
1244 btrace_data_init and btrace_data_fini.
1245
d6c146e9
PA
12462015-02-06 Pedro Alves <palves@redhat.com>
1247
1248 * thread-db.c (find_new_threads_callback): Add debug output.
1249
20ba1ce6
PA
12502015-02-04 Pedro Alves <palves@redhat.com>
1251
1252 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1253 (resume_stopped_resumed_lwps): New function.
1254 (linux_wait_for_event_filtered): Use it.
1255
8cc73a39
SDJ
12562015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1257
1258 * Makefile.in (SFILES): Add linux-personality.c.
1259 (linux-personality.o): New rule.
1260 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1261 list of objects to be built.
1262 * linux-low.c: Include nat/linux-personality.h.
1263 (linux_create_inferior): Remove code to disable address space
1264 randomization (moved to ../nat/linux-personality.c). Create
1265 cleanup to disable address space randomization.
1266
fb23d554
SDJ
12672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1268
1269 * Makefile.in (posix-strerror.o): New rule.
1270 (mingw-strerror.o): Likewise.
1271 * configure: Regenerated.
1272 * configure.ac: Source file ../common/common.host. Initialize new
1273 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1274
cdf43629
YQ
12752015-01-14 Yao Qi <yao@codesourcery.com>
1276
1277 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1278 (ppc-linux.o): New rule.
1279 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1280 * configure.ac: AC_CHECK_FUNCS(getauxval).
1281 * config.in: Re-generated.
1282 * configure: Re-generated.
1283 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1284 ppc64_64bit_inferior_p
1285
514c5338
YQ
12862015-01-14 Yao Qi <yao@codesourcery.com>
1287
1288 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1289 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1290 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1291 (PT_ORIG_R3, PT_TRAP): Likewise.
1292 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1293 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1294 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1295
3368c1e5
JB
12962015-01-10 Joel Brobecker <brobecker@adacore.com>
1297
1298 * i387-fp.c (i387_cache_to_xsave): In look over
1299 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1300 zmmh_low_space field by use of zmmh_high_space.
1301
582511be
PA
13022015-01-09 Pedro Alves <palves@redhat.com>
1303
1304 * linux-low.c (step_over_bkpt): Move higher up in the file.
1305 (handle_extended_wait): Don't store the stop_pc here.
1306 (get_stop_pc): Adjust comments and rename to ...
1307 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1308 stopped for a software breakpoint or hardware breakpoint.
1309 (thread_still_has_status_pending_p): New function.
1310 (status_pending_p_callback): Use
1311 thread_still_has_status_pending_p. If the event is no longer
1312 interesting, resume the LWP.
1313 (handle_tracepoints): Add assert.
1314 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1315 (wstatus_maybe_breakpoint): New function.
1316 (cancel_breakpoint): Delete function.
1317 (check_stopped_by_watchpoint): New function, factored out from
1318 linux_low_filter_event.
1319 (lp_status_maybe_breakpoint): Delete function.
1320 (linux_low_filter_event): Remove filter_ptid argument.
1321 Leave thread group exits pending here. Store the LWP's stop PC.
1322 Always leave events pending.
1323 (linux_wait_for_event_filtered): Pull all events out of the
1324 kernel, and leave them all pending.
1325 (count_events_callback, select_event_lwp_callback): Consider all
1326 events.
1327 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1328 (select_event_lwp): Only give preference to the stepping LWP in
1329 all-stop mode. Adjust comments.
1330 (ignore_event): New function.
1331 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1332 references to cancel_breakpoints. Adjust to renames. Also give
1333 equal priority to all LWPs that have had events in non-stop mode.
1334 If reporting a software breakpoint event, unadjust the LWP's PC.
1335 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1336 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1337 Adjust.
1338 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1339 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1340 (linux_stopped_by_watchpoint): Adjust.
1341 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1342 * linux-low.h (enum lwp_stop_reason): New.
1343 (struct lwp_info) <stop_pc>: Adjust comment.
1344 <stopped_by_watchpoint>: Delete field.
1345 <stop_reason>: New field.
1346 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1347 * mem-break.c (software_breakpoint_inserted_here)
1348 (hardware_breakpoint_inserted_here): New function.
1349 * mem-break.h (software_breakpoint_inserted_here)
1350 (hardware_breakpoint_inserted_here): Declare.
1351 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1352 (cancel_breakpoints): Delete.
1353 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1354 (upload_fast_traceframes): Remove references to
1355 cancel_breakpoints.
1356
a33e3959
PA
13572015-01-09 Pedro Alves <palves@redhat.com>
1358
1359 * thread-db.c (find_new_threads_callback): Ignore thread if the
1360 kernel thread ID is -1.
1361
8784d563
PA
13622015-01-09 Pedro Alves <palves@redhat.com>
1363
1364 * linux-low.c (linux_attach_fail_reason_string): Move to
1365 nat/linux-ptrace.c, and rename.
1366 (linux_attach_lwp): Update comment.
1367 (attach_proc_task_lwp_callback): New function.
1368 (linux_attach): Adjust to rename and use
1369 linux_proc_attach_tgid_threads.
1370 (linux_attach_fail_reason_string): Delete declaration.
1371
76f2b779
JB
13722015-01-01 Joel Brobecker <brobecker@adacore.com>
1373
1374 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1375 * server.c (gdbserver_version): Likewise.
1376
fafcc06a
SDJ
13772014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1378
1379 * remote-utils.c: Include ctype.h.
1380 (input_interrupt): Explicitly handle the case when the char
1381 received is the NUL byte. Improve the printing of non-ASCII
1382 characters.
1383
beed38b8
JB
13842014-12-16 Joel Brobecker <brobecker@adacore.com>
1385
1386 * linux-low.c (linux_low_filter_event): Update call to
1387 linux_enable_event_reporting following the addition of
1388 a new parameter to that function.
1389
bf330350
CU
13902014-12-16 Catalin Udma <catalin.udma@freescale.com>
1391
1392 PR server/17457
1393 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1394 (AARCH64_FPCR_REGNO): Likewise.
1395 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1396 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1397 (aarch64_store_fpregset): Likewise.
1398
5227d625
JB
13992014-12-15 Joel Brobecker <brobecker@adacore.com>
1400
1401 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1402 Remove FIXME comment about assumption about N.
1403
f93b65a0
JB
14042014-12-13 Joel Brobecker <brobecker@adacore.com>
1405
1406 * configure.ac: If large-file support is disabled in GDBserver,
1407 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1408 * configure: Regenerate.
1409
e5a9158d
AA
14102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1411
1412 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1413 warning upon ENODATA from ptrace.
1414 * linux-s390-low.c (s390_store_tdb): New.
1415 (s390_regsets): Add regset for NT_S390_TDB.
1416
feea5f36
AA
14172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1418
1419 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1420 without a fill_function.
1421 * linux-s390-low.c (s390_fill_last_break): Remove.
1422 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1423 (s390_arch_setup): Use regset's size instead of fill_function for
1424 loop end condition.
1425
098dbe61
AA
14262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1427
1428 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1429 the regset's store function when ptrace returned an error.
1430 * regcache.c (get_thread_regcache): Invalidate register cache
1431 before fetching inferior's registers.
1432
28eef672
AA
14332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1434
1435 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1436 while-loop as for-loop.
1437 (regsets_store_inferior_registers): Likewise.
1438
bdca27a2
YQ
14392014-11-28 Yao Qi <yao@codesourcery.com>
1440
1441 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1442 * config.in, configure: Re-generate.
1443 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1444 is defined.
1445
9c232dda
YQ
14462014-11-21 Yao Qi <yao@codesourcery.com>
1447
1448 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1449 (AC_CHECK_HEADERS): Remove malloc.h.
1450 * configure: Re-generated.
1451 * config.in: Re-generated.
1452 * server.h: Don't include alloca.h and malloc.h.
1453 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1454 Don't include malloc.h.
1455
43968415
JB
14562014-11-17 Joel Brobecker <brobecker@adacore.com>
1457
1458 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1459 corresponding ERRNO check in same block.
1460
40e91bc7
PA
14612014-11-12 Pedro Alves <palves@redhat.com>
1462
1463 * server.c (cont_thread): Update comment.
1464 (start_inferior, attach_inferior): No longer clear cont_thread.
1465 (handle_v_cont): No longer set cont_thread.
1466 (captured_main): Clear cont_thread each time a GDB connects.
1467
c2c118cf
PA
14682014-11-12 Pedro Alves <palves@redhat.com>
1469
1470 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1471 thread, and don't resume all threads if the Hc thread has exited.
1472
78708b7c
PA
14732014-11-12 Pedro Alves <palves@redhat.com>
1474
1475 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1476 the process group instead of to a specific LWP.
1477
a2abc7de
PA
14782014-10-15 Pedro Alves <palves@redhat.com>
1479
1480 PR server/17487
1481 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1482 parameter.
1483 (arm_set_thread_context): Delete.
1484 (the_low_target): Adjust.
1485 * win32-i386-low.c (debug_registers_changed)
1486 (debug_registers_used): Delete.
1487 (update_debug_registers_callback): New function.
1488 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1489 needing to update their debug registers.
1490 (win32_get_current_dr): New function.
1491 (x86_dr_low_get_addr, x86_dr_low_get_control)
1492 (x86_dr_low_get_status): Fetch the debug register from the thread
1493 record's context.
1494 (i386_initial_stuff): Adjust.
1495 (i386_get_thread_context): Remove current_event parameter. Don't
1496 clear debug_registers_changed nor copy DR values to
1497 debug_reg_state.
1498 (i386_set_thread_context): Delete.
1499 (i386_prepare_to_resume): New function.
1500 (i386_thread_added): Mark the thread as needing to update irs
1501 debug registers.
1502 (the_low_target): Remove i386_set_thread_context and install
1503 i386_prepare_to_resume.
1504 * win32-low.c (win32_get_thread_context): Adjust.
1505 (win32_set_thread_context): Use SetThreadContext
1506 directly.
1507 (win32_prepare_to_resume): New function.
1508 (win32_require_context): New function, factored out from ...
1509 (thread_rec): ... this.
1510 (continue_one_thread): Call win32_prepare_to_resume on each thread
1511 we're about to continue.
1512 (win32_resume): Call win32_prepare_to_resume on the event thread.
1513 * win32-low.h (struct win32_thread_info)
1514 <debug_registers_changed>: New field.
1515 (struct win32_target_ops): Change prototype of set_thread_context,
1516 delete set_thread_context and add prepare_to_resume.
1517 (win32_require_context): New declaration.
1518
a442d071
GB
15192014-10-08 Gary Benson <gbenson@redhat.com>
1520
1521 * server.h: Do not include common-exceptions.h.
1522
6f1947e8
GB
15232014-10-08 Gary Benson <gbenson@redhat.com>
1524
1525 * server.h: Do not include cleanups.h.
1526
63b434a4
JH
15272014-09-30 James Hogan <james.hogan@imgtec.com>
1528
1529 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1530 mips64-dsp-linux.c.
1531
c4d9ceb6
YQ
15322014-09-23 Yao Qi <yao@codesourcery.com>
1533
1534 * linux-low.c (lp_status_maybe_breakpoint): New function.
1535 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1536 (count_events_callback): Likewise.
1537 (select_event_lwp_callback): Likewise.
1538 (cancel_breakpoints_callback): Likewise.
1539
89a5711c
DB
15402014-09-19 Don Breazeal <donb@codesourcery.com>
1541
1542 * linux-low.c (handle_extended_wait): Call
1543 linux_ptrace_get_extended_event.
1544 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1545 linux_is_extended_waitstatus.
1546
bffc0964
JB
15472014-09-16 Joel Brobecker <brobecker@adacore.com>
1548
1549 * Makefile.in (CPPFLAGS): Define.
1550 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1551 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1552
0bfdf32f
GB
15532014-09-16 Gary Benson <gbenson@redhat.com>
1554
1555 * inferiors.h (current_inferior): Renamed as...
1556 (current_thread): New variable. All uses updated.
1557 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1558 (maybe_move_out_of_jump_pad): Likewise.
1559 (cancel_breakpoint): Likewise.
1560 (linux_low_filter_event): Likewise.
1561 (wait_for_sigstop): Likewise.
1562 (linux_resume_one_lwp): Likewise.
1563 (need_step_over_p): Likewise.
1564 (start_step_over): Likewise.
1565 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1566 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1567 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1568 and save_inferior as saved_thread.
1569 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1570 saved_thread.
1571 (regcache_invalidate_thread): Likewise.
1572 * remote-utils.c (prepare_resume_reply): Likewise.
1573 * thread-db.c (thread_db_get_tls_address): Likewise.
1574 (disable_thread_event_reporting): Likewise.
1575 (remove_thread_event_breakpoints): Likewise.
1576 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1577 as saved_thread.
1578 * target.h (set_desired_inferior): Renamed as...
1579 (set_desired_thread): New declaration. All uses updated.
1580 * server.c (myresume): Updated comment to reference thread instead
1581 of inferior.
1582 (handle_serial_event): Likewise.
1583 (handle_target_event): Likewise.
1584
361c8ade
GB
15852014-09-12 Tom Tromey <tromey@redhat.com>
1586 Gary Benson <gbenson@redhat.com>
1587
1588 * regcache.h: Include common-regcache.h.
1589 (regcache_read_pc): Don't declare.
1590 * regcache.c (get_thread_regcache_for_ptid): New function.
1591
bd9269f7
GB
15922014-09-11 Tom Tromey <tromey@redhat.com>
1593 Gary Benson <gbenson@redhat.com>
1594
1595 * symbol.c: New file.
1596 * Makefile.in (SFILES): Add symbol.c.
1597 (OBS): Add symbol.o.
1598
f8c1d06b
GB
15992014-09-11 Gary Benson <gbenson@redhat.com>
1600
1601 * target.c (target_stop_ptid, target_continue_ptid): New
1602 functions.
1603
721ec300
GB
16042014-09-11 Tom Tromey <tromey@redhat.com>
1605 Gary Benson <gbenson@redhat.com>
1606
1607 * target.h: Include target/target.h.
1608 * target.c (target_read_memory, target_read_uint32)
1609 (target_write_memory): New functions.
1610
c5e92cca
GB
16112014-09-11 Gary Benson <gbenson@redhat.com>
1612
1613 * server.h (debug_hw_points): Don't declare.
1614 * server.c (debug_hw_points): Don't define. Replace all uses
1615 with show_debug_regs.
1616 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1617 all uses with show_debug_regs.
1618
2e4bb98a
EBM
16192014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1620
1621 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1622 endianness into account.
1623 (ppc_supply_ptrace_register): Likewise.
1624
ac740bc7
JH
16252014-09-03 James Hogan <james.hogan@imgtec.com>
1626
1627 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1628 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1629
97ea6506
GB
16302014-09-03 Gary Benson <gbenson@redhat.com>
1631
1632 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1633 ALL_DEBUG_ADDRESS_REGISTERS.
1634
df7e5265
GB
16352014-09-02 Gary Benson <gbenson@redhat.com>
1636
1637 * i386-low.h: Renamed as...
1638 * x86-low.h: New file. All type, function and variable name
1639 prefixes changed from "i386_" to "x86_". All references updated.
1640 * i386-low.c: Renamed as...
1641 * x86-low.c: New file. All type, function and variable name
1642 prefixes changed from "i386_" to "x86_". All references updated.
1643
ed859da7
GB
16442014-09-02 Gary Benson <gbenson@redhat.com>
1645
1646 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1647 (x86_linux_new_thread): Likewise.
1648
860789c7
GB
16492014-08-29 Gary Benson <gbenson@redhat.com>
1650
1651 * server.h (setjmp.h): Do not include.
1652 (toplevel): Do not declare.
1653 (common-exceptions.h): Include.
1654 (cleanups.h): Likewise.
1655 * server.c (toplevel): Do not define.
1656 (exit_code): New static global.
1657 (detach_or_kill_for_exit_cleanup): New function.
1658 (main): New function. Original main renamed to...
1659 (captured_main): New function.
1660 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1661
ff55e1b5
GB
16622014-08-29 Gary Benson <gbenson@redhat.com>
1663
1664 * Makefile.in (SFILES): Add common/common-exceptions.c.
1665 (OBS): Add common-exceptions.o.
1666 (common-exceptions.o): New rule.
1667 * utils.c (prepare_to_throw_exception): New function.
1668
e9bcb658
GB
16692014-08-29 Gary Benson <gbenson@redhat.com>
1670
1671 * config.in: Regenerate.
1672 * configure: Likewise.
1673
e3180625
GB
16742014-08-29 Gary Benson <gbenson@redhat.com>
1675
1676 * Makefile.in (SFILES): Add common/cleanups.c.
1677 (OBS): cleanups.o.
1678 (cleanups.o): New rule.
1679
e3d6ba5d
GB
16802014-08-29 Gary Benson <gbenson@redhat.com>
1681
1682 * utils.c (internal_vwarning): New function.
1683
7096e886
GB
16842014-08-28 Gary Benson <gbenson@redhat.com>
1685
1686 * utils.h (fatal): Remove declaration.
1687 * utils.c (fatal): Remove function.
1688
14ce3192
GB
16892014-08-28 Gary Benson <gbenson@redhat.com>
1690
1691 * tracepoint.c (gdb_agent_init): Replace fatal with
1692 perror_with_name.
1693 (initialize_tracepoint): Likewise.
1694
50278d59
GB
16952014-08-28 Gary Benson <gbenson@redhat.com>
1696
1697 * remote-utils.c (remote_prepare): Replace fatal with error.
1698
aa96c426
GB
16992014-08-28 Gary Benson <gbenson@redhat.com>
1700
1701 * linux-low.c (linux_async): Replace fatal with warning.
1702 Tidy up and return.
1703 (linux_start_non_stop): Return -1 if linux_async failed.
1704
f7160e97
GB
17052014-08-28 Gary Benson <gbenson@redhat.com>
1706
1707 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1708 gdb_assert.
1709 (i386_dr_low_get_addr): Remove vague comment.
1710 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1711 gdb_assert.
1712
38e08fca
GB
17132014-08-28 Gary Benson <gbenson@redhat.com>
1714
1715 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1716 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1717 internal_error.
1718 (linux_resume_one_lwp): Likewise.
1719 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1720 gdb_assert.
1721 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1722 with internal_error.
1723 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1724 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1725 (find_register_by_name): Replace fatal with internal_error.
1726 (find_regno): Likewise.
1727 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1728 * thread-db.c (thread_db_create_event): Likewise.
1729 (thread_db_load_search): Likewise.
1730 (try_thread_db_load_1): Likewise.
1731 * tracepoint.c (get_jump_space_head): Replace fatal with
1732 internal_error.
1733 (claim_trampoline_space): Likewise.
1734 (have_fast_tracepoint_trampoline_buffer): Likewise.
1735 (cmd_qtstart): Likewise.
1736 (stop_tracing): Likewise.
1737 (fast_tracepoint_collecting): Likewise.
1738 (target_malloc): Likewise.
1739 (download_tracepoint): Likewise.
1740 (download_trace_state_variables): Replace check with gdb_assert.
1741 (upload_fast_traceframes): Replace fatal with internal_error.
1742
34abf635
GB
17432014-08-19 Tom Tromey <tromey@redhat.com>
1744 Gary Benson <gbenson@redhat.com>
1745
1746 * Makefile.in (SFILES): Add common/common-debug.c.
1747 (OBS): Add common-debug.o.
1748 (common-debug.o): New rule.
1749 * debug.h (debug_printf): Don't declare.
1750 * debug.c (debug_printf): Renamed and rewritten as...
1751 (debug_vprintf): New function.
1752
f6e94d78
GB
17532014-08-19 Gary Benson <gbenson@redhat.com>
1754
1755 * utils.h: Do not include print-utils.h.
1756
9239eeab
GB
17572014-08-19 Tom Tromey <tromey@redhat.com>
1758 Gary Benson <gbenson@redhat.com>
1759
1760 * server.h: Add static assertion.
1761 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1762
ef87c8bb
GB
17632014-08-19 Tom Tromey <tromey@redhat.com>
1764 Gary Benson <gbenson@redhat.com>
1765
1766 * Makefile.in (SFILES): Add common/errors.c.
1767 (OBS): Add errors.o.
1768 (IPA_OBS): Add errors-ipa.o.
1769 (errors.o): New rule.
1770 (errors-ipa.o): Likewise.
1771 * utils.h (perror_with_name, error, warning): Don't declare.
1772 * utils.c (warning): Renamed and rewritten as...
1773 (vwarning): New function.
1774 (error): Renamed and rewritten as...
1775 (verror): New function.
1776 (internal_error): Renamed and rewritten as...
1777 (internal_verror): New function.
1778
bb974a24
GB
17792014-08-07 Gary Benson <gbenson@redhat.com>
1780
1781 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1782 * configure: Regenerate.
1783 * config.in: Likewise.
1784 * server.h: Do not include errno.h.
1785 * event-loop.c: Likewise.
1786 * hostio-errno.c: Likewise.
1787 * linux-low.c: Likewise.
1788 * remote-utils.c: Likewise.
1789 * spu-low.c: Likewise.
1790 * utils.c: Likewise.
1791 * gdbreplay.c: Unconditionally include errno.h.
1792
6d3d12eb
GB
17932014-08-07 Gary Benson <gbenson@redhat.com>
1794
1795 * server.h: Do not include string.h.
1796 * event-loop.c: Likewise.
1797 * linux-low.c: Likewise.
1798 * regcache.c: Likewise.
1799 * remote-utils.c: Likewise.
1800 * spu-low.c: Likewise.
1801 * utils.c: Likewise.
1802
dccbb609
GB
18032014-08-07 Gary Benson <gbenson@redhat.com>
1804
1805 * server.h: Do not include gdb_assert.h.
1806
e76df0d0
GB
18072014-08-07 Gary Benson <gbenson@redhat.com>
1808
1809 * server.h: Do not include common-utils.h.
1810
4cb9c816
GB
18112014-08-07 Gary Benson <gbenson@redhat.com>
1812
1813 * server.h: Do not include ptid.h.
1814 * notif.h: Likewise.
1815
3995eeee
GB
18162014-08-07 Gary Benson <gbenson@redhat.com>
1817
1818 * server.h: Do not include gdb_locale.h.
1819
cb9f1a9b
GB
18202014-08-07 Gary Benson <gbenson@redhat.com>
1821
1822 * server.h: Do not include gdb/signals.h.
1823 * win32-low.c: Likewise.
1824
a5fceff8
GB
18252014-08-07 Gary Benson <gbenson@redhat.com>
1826
1827 * server.h: Do not include pathmax.h.
1828
b9391142
GB
18292014-08-07 Gary Benson <gbenson@redhat.com>
1830
1831 * server.h: Do not include libiberty.h.
1832 * linux-bfin-low.c: Likewise.
1833
0e443c87
GB
18342014-08-07 Gary Benson <gbenson@redhat.com>
1835
1836 * server.h: Do not include ansidecl.h.
1837
8ebb3f56
GB
18382014-08-07 Gary Benson <gbenson@redhat.com>
1839
1840 * linux-x86-low.c: Do not include stddef.h.
1841 * lynx-ppc-low.c: Likewise.
1842 * tracepoint.c: Likewise.
1843
8980bdf6
GB
18442014-08-07 Gary Benson <gbenson@redhat.com>
1845
1846 * server.h: Do not include stdarg.h.
1847 * nto-low.c: Likewise.
1848
d7096f71
GB
18492014-08-07 Gary Benson <gbenson@redhat.com>
1850
1851 * server.h: Do not include stdlib.h.
1852 * inferiors.c: Likewise.
1853 * linux-low.c: Likewise.
1854 * regcache.c: Likewise.
1855 * spu-low.c: Likewise.
1856 * tracepoint.c: Likewise.
1857 * utils.c: Likewise.
1858
d02f550d
GB
18592014-08-07 Gary Benson <gbenson@redhat.com>
1860
1861 * server.h: Do not include stdio.h.
1862 * linux-low.c: Likewise.
1863 * remote-utils.c: Likewise.
1864 * spu-low.c: Likewise.
1865 * utils.c: Likewise.
1866 * wincecompat.c: Likewise.
1867
87f6c4e3
GB
18682014-08-06 Gary Benson <gbenson@redhat.com>
1869
1870 * regcache.c (init_register_cache): Move conditionals inside if.
1871
7089dca4
GB
18722014-08-06 Gary Benson <gbenson@redhat.com>
1873
1874 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1875
462f517e
GB
18762014-07-31 Gary Benson <gbenson@redhat.com>
1877
1878 * ax.h: Do not include server.h.
1879 * gdbthread.h: Likewise.
1880 * lynx-low.h: Likewise.
1881 * notif.h: Likewise.
1882
976411d6
GB
18832014-07-30 Gary Benson <gbenson@redhat.com>
1884
1885 * server.h: Include common-defs.h.
1886 Do not include config.h or build-gnulib-gdbserver/config.h.
1887
d41f6d8e
GB
18882014-07-30 Gary Benson <gbenson@redhat.com>
1889
1890 * hostio-errno.c: Move server.h to top of includes list.
1891 * inferiors.c: Likewise.
1892 * linux-x86-low.c: Likewise.
1893 * notif.c: Include server.h.
1894
314c6a35
TT
18952014-07-24 Tom Tromey <tromey@redhat.com>
1896 Gary Benson <gbenson@redhat.com>
1897
1898 * server.h (CORE_ADDR): Now unsigned.
1899
69ff6be5
PA
19002014-07-16 Pedro Alves <palves@redhat.com>
1901
1902 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1903
ce9e3fe7
PA
19042014-07-15 Pedro Alves <palves@redhat.com>
1905
1906 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1907 copy.
1908
e76126e8
PA
19092014-07-11 Pedro Alves <palves@redhat.com>
1910
1911 * linux-low.c (kill_wait_lwp): New function, based on
1912 kill_one_lwp_callback, but use my_waitpid directly.
1913 (kill_one_lwp_callback, linux_kill): Use it.
1914
8e9db26e
PA
19152014-06-23 Pedro Alves <palves@redhat.com>
1916
1917 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1918 before setting DR0..DR3.
1919
698b3e08
GB
19202014-06-20 Gary Benson <gbenson@redhat.com>
1921
1922 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1923 * configure: Regenerated.
1924 * config.in: Likewise.
1925
125f8a3d
GB
19262014-06-20 Gary Benson <gbenson@redhat.com>
1927
1928 * Makefile.in (SFILES): Update locations for files moved
1929 from common to nat.
1930 (object file files): Reordered.
1931
42995dbd
GB
19322014-06-20 Gary Benson <gbenson@redhat.com>
1933
1934 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1935 (i386_dr_low_set_addr): Likewise.
1936 (i386_dr_low_get_addr): Likewise.
1937 (i386_dr_low_can_set_control): Likewise.
1938 (i386_dr_low_set_control): Likewise.
1939 (i386_dr_low_get_control): Likewise.
1940 (i386_dr_low_get_status): Likewise.
1941 (i386_get_debug_register_length): Likewise.
1942 * linux-x86-low.c (i386_dr_low_set_addr):
1943 Changed signature. Made static.
1944 (i386_dr_low_get_addr): Likewise.
1945 (i386_dr_low_set_control): Likewise.
1946 (i386_dr_low_get_control): Likewise.
1947 (i386_dr_low_get_status): Likewise.
1948 (i386_dr_low): New global variable.
1949 * win32-i386-low.c (i386_dr_low_set_addr):
1950 Changed signature. Made static.
1951 (i386_dr_low_get_addr): Likewise.
1952 (i386_dr_low_set_control): Likewise.
1953 (i386_dr_low_get_control): Likewise.
1954 (i386_dr_low_get_status): Likewise.
1955 (i386_dr_low): New global variable.
1956
e1d2394b
MS
19572014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1958
1959 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1960 * Makefile.in (AR, AR_FLAGS): Define.
1961 * configure: Regenerate.
1962
3a8ee006
GB
19632014-06-19 Gary Benson <gbenson@redhat.com>
1964
1965 * Makefile.in (i386-dregs.o): New rule.
1966 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1967 * i386-low.c (target.h): Remove include.
1968 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1969 (DR_CONTROL_SHIFT): Likewise.
1970 (DR_CONTROL_SIZE): Likewise.
1971 (DR_RW_EXECUTE): Likewise.
1972 (DR_RW_WRITE): Likewise.
1973 (DR_RW_READ): Likewise.
1974 (DR_RW_IORW): Likewise.
1975 (DR_LEN_1): Likewise.
1976 (DR_LEN_2): Likewise.
1977 (DR_LEN_4): Likewise.
1978 (DR_LEN_8): Likewise.
1979 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1980 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1981 (DR_ENABLE_SIZE): Likewise.
1982 (DR_LOCAL_SLOWDOWN): Likewise.
1983 (DR_GLOBAL_SLOWDOWN): Likewise.
1984 (DR_CONTROL_RESERVED): Likewise.
1985 (I386_DR_CONTROL_MASK): Likewise.
1986 (I386_DR_VACANT): Likewise.
1987 (I386_DR_LOCAL_ENABLE): Likewise.
1988 (I386_DR_GLOBAL_ENABLE): Likewise.
1989 (I386_DR_DISABLE): Likewise.
1990 (I386_DR_SET_RW_LEN): Likewise.
1991 (I386_DR_GET_RW_LEN): Likewise.
1992 (I386_DR_WATCH_HIT): Likewise.
1993 (i386_wp_op_t): Likewise.
1994 (i386_show_dr): Likewise.
1995 (i386_length_and_rw_bits): Likewise.
1996 (i386_insert_aligned_watchpoint): Likewise.
1997 (i386_remove_aligned_watchpoint): Likewise.
1998 (i386_handle_nonaligned_watchpoint): Likewise.
1999 i386_update_inferior_debug_regs(): Likewise.
2000 (i386_dr_insert_watchpoint): Likewise.
2001 (i386_dr_remove_watchpoint): Likewise.
2002 (i386_dr_region_ok_for_watchpoint): Likewise.
2003 (i386_dr_stopped_data_address): Likewise.
2004 (i386_dr_stopped_by_watchpoint): Likewise.
2005
8f26655c
GB
20062014-06-19 Gary Benson <gbenson@redhat.com>
2007
2008 * i386-low.c (i386_dr_show): Renamed to
2009 i386_show_dr and made static. All uses updated.
2010 (i386_dr_length_and_rw_bits): Renamed to
2011 i386_length_and_rw_bits and made static.
2012 All uses updated.
2013 (i386_dr_insert_aligned_watchpoint): Renamed to
2014 i386_insert_aligned_watchpoint and made static.
2015 All uses updated.
2016 (i386_dr_remove_aligned_watchpoint): Renamed to
2017 i386_remove_aligned_watchpoint and made static.
2018 All uses updated.
2019 (i386_dr_update_inferior_debug_regs): Renamed to
2020 i386_update_inferior_debug_regs and made static.
2021 All uses updated.
2022
b9228891
GB
20232014-06-18 Gary Benson <gbenson@redhat.com>
2024
5171def3
GB
2025 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2026 (i386_dr_low_can_set_control): Likewise.
2027 (i386_get_debug_register_length): Likewise.
2028 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2029 (i386_dr_low_can_set_control): Likewise.
2030 (i386_get_debug_register_length): Likewise.
2031
20322014-06-17 Gary Benson <gbenson@redhat.com>
2033
b9228891
GB
2034 * i386-low.h (i386-dregs.h): New include.
2035 (DR_FIRSTADDR): Now in i386-dregs.h.
2036 (DR_LASTADDR): Likewise.
2037 (DR_NADDR): Likewise.
2038 (DR_STATUS): Likewise.
2039 (DR_CONTROL): Likewise.
2040 (i386_debug_reg_state): Likewise.
2041 (i386_dr_insert_watchpoint): Likewise.
2042 (i386_dr_remove_watchpoint): Likewise.
2043 (i386_dr_region_ok_for_watchpoint): Likewise.
2044 (i386_dr_stopped_data_address): Likewise.
2045 (i386_dr_stopped_by_watchpoint): Likewise.
2046 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2047
4be83cc2
GB
20482014-06-18 Gary Benson <gbenson@redhat.com>
2049
2050 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2051 i386_dr_insert_watchpoint.
2052 (i386_low_remove_watchpoint): Renamed to
2053 i386_dr_remove_watchpoint.
2054 (i386_low_region_ok_for_watchpoint): Renamed to
2055 i386_dr_region_ok_for_watchpoint.
2056 (i386_low_stopped_data_address): Renamed to
2057 i386_dr_stopped_data_address.
2058 (i386_low_stopped_by_watchpoint): Renamed to
2059 i386_dr_stopped_by_watchpoint.
2060 * i386-low.c (i386_show_dr): Renamed to
2061 i386_dr_show and made nonstatic. All uses updated.
2062 (i386_length_and_rw_bits): Renamed to
2063 i386_dr_length_and_rw_bits and made nonstatic.
2064 All uses updated.
2065 (i386_insert_aligned_watchpoint): Renamed to
2066 i386_dr_insert_aligned_watchpoint and made nonstatic.
2067 All uses updated.
2068 (i386_remove_aligned_watchpoint): Renamed to
2069 i386_dr_remove_aligned_watchpoint and made nonstatic.
2070 All uses updated.
2071 (i386_update_inferior_debug_regs): Renamed to
2072 i386_dr_update_inferior_debug_regs and made nonstatic.
2073 All uses updated.
2074 (i386_low_insert_watchpoint): Renamed to
2075 i386_dr_insert_watchpoint. All uses updated.
2076 (i386_low_remove_watchpoint): Renamed to
2077 i386_dr_remove_watchpoint. All uses updated.
2078 (i386_low_region_ok_for_watchpoint): Renamed to
2079 i386_dr_region_ok_for_watchpoint. All uses updated.
2080 (i386_low_stopped_data_address): Renamed to
2081 i386_dr_stopped_data_address. All uses updated.
2082 (i386_low_stopped_by_watchpoint): Renamed to
2083 i386_dr_stopped_by_watchpoint. All uses updated.
2084
131aa0d4
GB
20852014-06-18 Gary Benson <gbenson@redhat.com>
2086
2087 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2088 (i386_dr_low_can_set_control): Likewise.
2089 (i386_insert_aligned_watchpoint): New check.
2090
d9305f7f
GB
20912014-06-18 Gary Benson <gbenson@redhat.com>
2092
2093 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2094 Renamed to state.
2095
e927c9fc
GB
20962014-06-18 Gary Benson <gbenson@redhat.com>
2097
2098 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2099 instead of fatal and error.
2100 (i386_handle_nonaligned_watchpoint): Likewise.
2101
1b6d4134
GB
21022014-06-18 Gary Benson <gbenson@redhat.com>
2103
2104 * i386-low.c (i386_get_debug_register_length): New macro.
2105 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2106 (i386_show_dr): Use debug_printf instead of fprintf. Use
2107 phex to format values.
2108
6e62758f
GB
21092014-06-18 Gary Benson <gbenson@redhat.com>
2110
2111 * i386-low.h: Comment changes.
2112 * i386-low.c: Likewise.
2113
fc6e2f03
GB
21142014-06-18 Gary Benson <gbenson@redhat.com>
2115
2116 * i386-low.c: Whitespace changes.
2117
f9d1eeed
TT
21182014-06-12 Tom Tromey <tromey@redhat.com>
2119
2120 * utils.c (freeargv): Remove.
2121
0b04e523
TT
21222014-06-12 Tom Tromey <tromey@redhat.com>
2123
2124 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2125 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2126 (parse_debug_format_options): Likewise.
2127 (gdbserver_usage): Likewise.
2128 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2129 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2130 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2131 against libiberty.
2132 ($(LIBGNU)): Depend on libiberty.
2133 (all-lib): Recurse into all subdirs.
2134 (install-only): Invoke "install" target in subdirs.
2135 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2136 targets.
2137 * configure: Rebuild.
2138 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2139 for vasprintf, vsnprintf, or gettimeofday.
2140 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2141 srv_tgtobj.
2142
270c9937
JB
21432014-06-05 Joel Brobecker <brobecker@adacore.com>
2144
2145 * development.sh: Delete.
2146 * Makefile.in (config.status): Adjust dependency on development.sh.
2147 * configure.ac: Adjust development.sh source call.
2148 * configure: Regenerate.
2149
0a261ed8
PA
21502014-06-02 Pedro Alves <palves@redhat.com>
2151
2152 * ax.c (gdb_free_agent_expr): New function.
2153 * ax.h (gdb_free_agent_expr): New declaration.
2154 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2155 list.
2156 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2157 static.
2158 (clear_breakpoint_conditions_and_commands): New function.
2159 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2160 (clear_breakpoint_conditions_and_commands): New declaration.
2161
e9dae05e
RR
21622014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2163
2164 * linux-aarch64-low.c (asm/ptrace.h): Include.
2165
5876f503
JK
21662014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2167
2168 Fix TLS access for -static -pthread.
2169 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2170 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2171 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2172
802e8e6d
PA
21732014-05-20 Pedro Alves <palves@redhat.com>
2174
2175 * linux-aarch64-low.c (aarch64_insert_point)
2176 (aarch64_remove_point): No longer check whether the type is
2177 supported here. Adjust to new interface.
2178 (the_low_target): Install aarch64_supports_z_point_type as
2179 supports_z_point_type method.
2180 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2181 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2182 instead of a Z packet char. Adjust.
2183 (arm_supports_z_point_type): New function.
2184 (arm_insert_point, arm_remove_point): Adjust to new interface.
2185 (the_low_target): Install arm_supports_z_point_type.
2186 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2187 (cris_insert_point, cris_remove_point): Adjust to new interface.
2188 Don't check whether the type is supported here.
2189 (the_low_target): Install cris_supports_z_point_type.
2190 * linux-low.c (linux_supports_z_point_type): New function.
2191 (linux_insert_point, linux_remove_point): Adjust to new interface.
2192 * linux-low.h (struct linux_target_ops) <insert_point,
2193 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2194 raw_breakpoint pointer parameter.
2195 <supports_z_point_type>: New method.
2196 * linux-mips-low.c (mips_supports_z_point_type): New function.
2197 (mips_insert_point, mips_remove_point): Adjust to new interface.
2198 Use mips_supports_z_point_type.
2199 (the_low_target): Install mips_supports_z_point_type.
2200 * linux-ppc-low.c (the_low_target): Install NULL as
2201 supports_z_point_type method.
2202 * linux-s390-low.c (the_low_target): Install NULL as
2203 supports_z_point_type method.
2204 * linux-sparc-low.c (the_low_target): Install NULL as
2205 supports_z_point_type method.
2206 * linux-x86-low.c (x86_supports_z_point_type): New function.
2207 (x86_insert_point): Adjust to new insert_point interface. Use
2208 insert_memory_breakpoint. Adjust to new
2209 i386_low_insert_watchpoint interface.
2210 (x86_remove_point): Adjust to remove_point interface. Use
2211 remove_memory_breakpoint. Adjust to new
2212 i386_low_remove_watchpoint interface.
2213 (the_low_target): Install x86_supports_z_point_type.
2214 * lynx-low.c (lynx_target_ops): Install NULL as
2215 supports_z_point_type callback.
2216 * nto-low.c (nto_supports_z_point_type): New.
2217 (nto_insert_point, nto_remove_point): Adjust to new interface.
2218 (nto_target_ops): Install nto_supports_z_point_type.
2219 * mem-break.c: Adjust intro comment.
2220 (struct raw_breakpoint) <raw_type, size>: New fields.
2221 <inserted>: Update comment.
2222 <shlib_disabled>: Delete field.
2223 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2224 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2225 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2226 (raw_bkpt_type_to_target_hw_bp_type): New function.
2227 (find_enabled_raw_code_breakpoint_at): New function.
2228 (find_raw_breakpoint_at): New type and size parameters. Use them.
2229 (insert_memory_breakpoint): New function, based off
2230 set_raw_breakpoint_at.
2231 (remove_memory_breakpoint): New function.
2232 (set_raw_breakpoint_at): Reimplement.
2233 (set_breakpoint): New, based on set_breakpoint_at.
2234 (set_breakpoint_at): Reimplement.
2235 (delete_raw_breakpoint): Go through the_target->remove_point
2236 instead of assuming memory breakpoints.
2237 (find_gdb_breakpoint_at): Delete.
2238 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2239 (find_gdb_breakpoint): New function.
2240 (set_gdb_breakpoint_at): Delete.
2241 (z_type_supported): New function.
2242 (set_gdb_breakpoint_1): New function, loosely based off
2243 set_gdb_breakpoint_at.
2244 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2245 (delete_gdb_breakpoint_at): Delete.
2246 (delete_gdb_breakpoint_1): New function, loosely based off
2247 delete_gdb_breakpoint_at.
2248 (delete_gdb_breakpoint): New function.
2249 (clear_gdb_breakpoint_conditions): Rename to ...
2250 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2251 breakpoint.
2252 (add_condition_to_breakpoint): Make static.
2253 (add_breakpoint_condition): Take a struct breakpoint pointer
2254 instead of an address. Adjust.
2255 (gdb_condition_true_at_breakpoint): Rename to ...
2256 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2257 z_type parameter.
2258 (gdb_condition_true_at_breakpoint): Reimplement.
2259 (add_breakpoint_commands): Take a struct breakpoint pointer
2260 instead of an address. Adjust.
2261 (gdb_no_commands_at_breakpoint): Rename to ...
2262 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2263 parameter. Return true if no breakpoint was found. Change debug
2264 output.
2265 (gdb_no_commands_at_breakpoint): Reimplement.
2266 (run_breakpoint_commands): Rename to ...
2267 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2268 and change return type to boolean.
2269 (run_breakpoint_commands): New function.
2270 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2271 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2272 breakpoint. Go through the_target->remove_point instead of
2273 assuming memory breakpoint.
2274 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2275 software and hardware breakpoints.
2276 (reinsert_raw_breakpoint): Go through the_target->insert_point
2277 instead of assuming memory breakpoint.
2278 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2279 software and hardware breakpoints.
2280 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2281 Check both software and hardware breakpoints.
2282 (validate_inserted_breakpoint): Assert the breakpoint is a
2283 software breakpoint. Set the inserted flag to -1 instead of
2284 setting shlib_disabled.
2285 (delete_disabled_breakpoints): Adjust.
2286 (validate_breakpoints): Only validate software breakpoints.
2287 Adjust to inserted flag change.
2288 (check_mem_read, check_mem_write): Skip breakpoint types other
2289 than software breakpoints. Adjust to inserted flag change.
2290 * mem-break.h (enum raw_bkpt_type): New enum.
2291 (raw_breakpoint, struct process_info): Forward declare.
2292 (Z_packet_to_target_hw_bp_type): Delete declaration.
2293 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2294 (set_gdb_breakpoint, delete_gdb_breakpoint)
2295 (clear_breakpoint_conditions): New declarations.
2296 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2297 (breakpoint_inserted_here): Update comment.
2298 (add_breakpoint_condition, add_breakpoint_commands): Replace
2299 address parameter with a breakpoint pointer parameter.
2300 (gdb_breakpoint_here): Update comment.
2301 (delete_gdb_breakpoint_at): Delete.
2302 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2303 * server.c (process_point_options): Take a struct breakpoint
2304 pointer instead of an address. Adjust.
2305 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2306 delete_gdb_breakpoint.
2307 * spu-low.c (spu_target_ops): Install NULL as
2308 supports_z_point_type method.
2309 * target.h: Include mem-break.h.
2310 (struct target_ops) <prepare_to_access_memory>: Update comment.
2311 <supports_z_point_type>: New field.
2312 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2313 instead of a char. Also take a raw breakpoint pointer.
2314 * win32-arm-low.c (the_low_target): Install NULL as
2315 supports_z_point_type.
2316 * win32-i386-low.c (i386_supports_z_point_type): New function.
2317 (i386_insert_point, i386_remove_point): Adjust to new interface.
2318 (the_low_target): Install i386_supports_z_point_type.
2319 * win32-low.c (win32_supports_z_point_type): New function.
2320 (win32_insert_point, win32_remove_point): Adjust to new interface.
2321 (win32_target_ops): Install win32_supports_z_point_type.
2322 * win32-low.h (struct win32_target_ops):
2323 <supports_z_point_type>: New method.
2324 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2325 instead of a char. Also take a raw breakpoint pointer.
2326
932539e3
PA
23272014-05-20 Pedro Alves <palves@redhat.com>
2328
2329 * mem-break.h: Include break-common.h.
2330 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2331 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2332 (Z_packet_to_target_hw_bp_type): New declaration.
2333 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2334 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2335 (Z_PACKET_ACCESS_WP): Delete macros.
2336 (Z_packet_to_hw_type): Delete function.
2337 * i386-low.h: Don't include break-common.h here.
2338 (Z_packet_to_hw_type): Delete declaration.
2339 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2340 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2341 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2342 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2343 * linux-aarch64-low.c: Don't include break-common.h here.
2344 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2345 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2346 (Z_packet_to_target_hw_bp_type): Delete function.
2347 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2348 function.
2349 (mips_insert_point, mips_remove_point): Use
2350 Z_packet_to_target_hw_bp_type.
2351
4ff0d3d8
PA
23522014-05-20 Pedro Alves <palves@redhat.com>
2353
2354 * linux-aarch64-low.c: Include break-common.h.
2355 (enum target_point_type): Delete.
2356 (Z_packet_to_point_type): Rename to ...
2357 (Z_packet_to_target_hw_bp_type): ... this, and return a
2358 target_hw_bp_type instead.
2359 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2360 instead of an enum target_point_type.
2361 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2362 breakpoint type.
2363 (aarch64_dr_state_insert_one_point)
2364 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2365 (aarch64_handle_aligned_watchpoint)
2366 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2367 Take an enum target_hw_bp_type instead of an enum
2368 target_point_type.
2369 (aarch64_supports_z_point_type): New function.
2370 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2371 use Z_packet_to_target_hw_bp_type.
2372
786dc519
JB
23732014-05-20 Joel Brobecker <brobecker@adacore.com>
2374
2375 * configure.ac: Only use -Werror by default when DEVELOPMENT
2376 is true.
2377 * configure: Regenerate.
2378
9e0aa64f
JK
23792014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2380
2381 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2382 * linux-x86-low.c (X86_64_USER_REGS): New.
2383 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2384
2b577b92
YQ
23852014-04-28 Yao Qi <yao@codesourcery.com>
2386
2387 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2388 name.
2389
94611da2
PA
23902014-04-25 Pedro Alves <palves@redhat.com>
2391
2392 PR server/16255
2393 * linux-low.c (linux_attach_fail_reason_string): New function.
2394 (linux_attach_lwp): Delete.
2395 (linux_attach_lwp_1): Rename to ...
2396 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2397 argument. Remove "initial" parameter. Return int instead of
2398 void. Don't error or warn here.
2399 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2400 failure to attach to the tgid. Call warning when failing to
2401 attach to an lwp.
2402 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2403 argument. Remove "initial" parameter. Return int instead of
2404 void. Don't error or warn here.
2405 (linux_attach_fail_reason_string): New declaration.
2406 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2407 interface change. Use linux_attach_fail_reason_string.
2408
01f9f808
MS
24092014-04-24 Michael Sturm <michael.sturm@mintel.com>
2410 Walfred Tedeschi <walfred.tedeschi@intel.com>
2411
2412 * Makefile.in: Added rules to handle new files
2413 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2414 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2415 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2416 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2417 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2418 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2419 x32-avx512-linux.o.
2420 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2421 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2422 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2423 i386/x32-avx512.xml.
2424 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2425 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2426 i386/x32-avx512-linux.xml.
2427 * i387-fp.c (num_avx512_k_registers): New constant for number
2428 of K registers.
2429 (num_avx512_zmmh_low_registers): New constant for number of
2430 lower ZMM registers (0-15).
2431 (num_avx512_zmmh_high_registers): New constant for number of
2432 higher ZMM registers (16-31).
2433 (num_avx512_ymmh_registers): New contant for number of higher
2434 YMM registers (ymm16-31 added by avx521 on x86_64).
2435 (num_avx512_xmm_registers): New constant for number of higher
2436 XMM registers (xmm16-31 added by AVX512 on x86_64).
2437 (struct i387_xsave): Add space for AVX512 registers.
2438 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2439 Add code to handle AVX512 registers.
2440 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2441 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2442 prototypei from generated file.
2443 (tdesc_amd64_avx512_linux): Likewise.
2444 (init_registers_x32_avx512_linux): Likewise.
2445 (tdesc_x32_avx512_linux): Likewise.
2446 (init_registers_i386_avx512_linux): Likewise.
2447 (tdesc_i386_avx512_linux): Likewise.
2448 (x86_64_regmap): Add AVX512 registers.
2449 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2450 mask.
2451 (initialize_low_arch): Add code to initialize AVX512 registers.
2452
51aa91f9
PA
24532014-04-23 Pedro Alves <palves@redhat.com>
2454
2455 * mem-break.c (find_gdb_breakpoint_at): Make static.
2456 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2457
a4165e94
PA
24582014-04-23 Pedro Alves <palves@redhat.com>
2459
2460 * i386-low.c: Don't include break-common.h here.
2461 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2462 prototype to take target_hw_bp_type as argument instead of a Z
2463 packet char.
2464 * i386-low.h: Include break-common.h here.
2465 (Z_packet_to_hw_type): Declare.
2466 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2467 prototypes.
2468 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2469 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2470 (x86_remove_point): Convert the packet number to a
2471 target_hw_bp_type before calling i386_low_remove_watchpoint.
2472 * win32-i386-low.c (i386_insert_point): Convert the packet number
2473 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2474 (i386_remove_point): Convert the packet number to a
2475 target_hw_bp_type before calling i386_low_remove_watchpoint.
2476
b8acf843
PA
24772014-04-23 Pedro Alves <palves@redhat.com>
2478
2479 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2480
d708bcd1
PA
24812014-04-10 Pedro Alves <palves@redhat.com>
2482
2483 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2484 Check if the condition or command is NULL before checking if the
2485 breakpoint is known. On success, return true.
2486 * mem-break.h (add_breakpoint_condition): Document return.
2487 (add_breakpoint_commands): Add describing comment.
2488 * server.c (skip_to_semicolon): New function.
2489 (process_point_options): Use it.
2490
2eec7d5b
PA
24912014-04-09 Pedro Alves <palves@redhat.com>
2492
2493 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2494 to lwpid_of.
2495
fa96cb38
PA
24962014-02-27 Pedro Alves <palves@redhat.com>
2497
2498 PR 12702
2499 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2500 macros.
2501 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2502 output.
2503 (last_thread_of_process_p): Take a PID argument instead of a
2504 thread pointer.
2505 (linux_wait_for_lwp): Delete.
2506 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2507 functions.
2508 (linux_low_filter_event): New function, party factored out from
2509 linux_wait_for_event.
2510 (linux_wait_for_event): Rename to ...
2511 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2512 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2513 sigsuspend. Check for zombie leaders.
2514 (linux_wait_for_event): Reimplement as wrapper around
2515 linux_wait_for_event_filtered.
2516 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2517 a normal or signal exit is seen, it's the whole process exiting.
2518 (wait_for_sigstop): No longer a for_each_inferior callback.
2519 Rewrite on top of linux_wait_for_event_filtered.
2520 (stop_all_lwps): Call wait_for_sigstop directly.
2521 * server.c (resume, handle_target_event): Handle
2522 TARGET_WAITKIND_NO_RESUMED.
2523
d763de10
JB
25242014-02-26 Joel Brobecker <brobecker@adacore.com>
2525
2526 * win32-low.c (psapi_get_dll_name,
2527 * win32_CreateToolhelp32Snapshot): Delete.
2528 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2529 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2530 Delete.
2531 (handle_load_dll): Add function description.
2532 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2533
850a0f76
JB
25342014-02-26 Joel Brobecker <brobecker@adacore.com>
2535
2536 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2537 Add comment.
2538 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2539 base address when calling win32_add_one_solib.
2540 (handle_load_dll): Delete local variable load_addr.
2541 Remove 0x1000 offset applied to DLL base address when calling
2542 win32_add_one_solib.
2543 (handle_unload_dll): Add comment.
2544
f25b3fc3
JB
25452014-02-26 Joel Brobecker <brobecker@adacore.com>
2546
2547 * win32-low.c (win32_add_all_dlls): Renames
2548 win32_ensure_ntdll_loaded. Rewrite function documentation.
2549 Adjust implementation to always load all DLLs.
2550 Add 0x1000 offset to DLL base address when calling
2551 win32_add_one_solib.
2552 (child_initialization_done): New static global.
2553 (do_initial_child_stuff): Set child_initialization_done to
2554 zero during child initialization, and 1 after. Replace call
2555 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2556 Add comment.
2557 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2558 (handle_unload_dll): Add function documentation.
2559 (get_child_debug_event): Ignore load and unload DLL events
2560 during child initialization.
2561
d86d4aaf
DE
25622014-02-20 Doug Evans <dje@google.com>
2563
3bc32da3 2564 Remove global all_lwps.
d86d4aaf
DE
2565 * inferiors.h (ptid_of): Move here from linux-low.h.
2566 (pid_of, lwpid_of): Ditto.
2567 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2568 parameter is a struct thread_info * now.
2569 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2570 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2571 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2572 directly.
2573 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2574 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2575 * linux-arm-low.c (update_registers_callback): Update, "entry"
2576 parameter is a struct thread_info * now.
2577 Fetch lwpid from current_inferior directly.
2578 (arm_insert_point): Pass &all_threads to find_inferior instead of
2579 &all_lwps.
2580 (arm_remove_point): Ditto.
2581 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2582 (arm_prepare_to_resume): Fetch pid from thread.
2583 (arm_read_description): Fetch lwpid from current_inferior directly.
2584 * linux-low.c (all_lwps): Delete.
2585 (delete_lwp): Delete call to remove_inferior.
2586 (handle_extended_wait): Fetch lwpid from thread.
2587 (add_lwp): Don't set lwp->entry.id. Remove call to
2588 add_inferior_to_list.
2589 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2590 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2591 (kill_one_lwp_callback): Ditto.
2592 (linux_kill): Don't dereference NULL pointer.
2593 Fetch ptid,lwpid from thread.
2594 (get_detach_signal): Fetch ptid from thread.
2595 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2596 Simplify call to regcache_invalidate_thread.
2597 (delete_lwp_callback): Update, "entry" parameter is a
2598 struct thread_info * now. Fetch pid from thread.
2599 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2600 (status_pending_p_callback): Update, "entry" parameter is a
2601 struct thread_info * now. Fetch ptid from thread.
2602 (find_lwp_pid): Update, "entry" parameter is a
2603 struct thread_info * now.
2604 (linux_wait_for_lwp): Fetch pid from thread.
2605 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2606 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2607 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2608 (dequeue_one_deferred_signal): Ditto.
2609 (cancel_breakpoint): Fetch ptid from current_inferior.
2610 (linux_wait_for_event): Pass &all_threads to find_inferior,
2611 not &all_lwps. Fetch ptid, lwpid from thread.
2612 (count_events_callback): Update, "entry" parameter is a
2613 struct thread_info * now.
2614 (select_singlestep_lwp_callback): Ditto.
2615 (select_event_lwp_callback): Ditto.
2616 (cancel_breakpoints_callback): Ditto.
2617 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2618 not &all_lwps.
2619 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2620 (unsuspend_one_lwp): Update, "entry" parameter is a
2621 struct thread_info * now.
2622 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2623 not &all_lwps.
2624 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2625 Fetch lwpid from thread, not lwp.
2626 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2627 Pass &all_threads to find_inferior, not &all_lwps.
2628 (send_sigstop): Fetch lwpid from thread, not lwp.
2629 (send_sigstop_callback): Update, "entry" parameter is a
2630 struct thread_info * now.
2631 (suspend_and_send_sigstop_callback): Ditto.
2632 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2633 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2634 struct thread_info * now.
2635 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2636 from thread, lwp.
2637 (lwp_running): Update, "entry" parameter is a
2638 struct thread_info * now.
2639 (stop_all_lwps): Fetch ptid from thread.
2640 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2641 (linux_resume_one_lwp): Fetch lwpid from thread.
2642 (linux_set_resume_request): Update, "entry" parameter is a
2643 struct thread_info * now. Fetch pid, lwpid from thread.
2644 (resume_status_pending_p): Update, "entry" parameter is a
2645 struct thread_info * now.
2646 (need_step_over_p): Ditto. Fetch lwpid from thread.
2647 (start_step_over): Fetch lwpid from thread.
2648 (linux_resume_one_thread): Update, "entry" parameter is a
2649 struct thread_info * now. Fetch lwpid from thread.
2650 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2651 (proceed_one_lwp): Update, "entry" parameter is a
2652 struct thread_info * now. Fetch lwpid from thread.
2653 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2654 struct thread_info * now.
2655 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2656 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2657 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2658 directly.
2659 (regsets_store_inferior_registers): Ditto.
2660 (fetch_register, store_register): Ditto.
2661 (linux_read_memory, linux_write_memory): Ditto.
2662 (linux_request_interrupt): Ditto.
2663 (linux_read_auxv): Ditto.
2664 (linux_xfer_siginfo): Ditto.
2665 (linux_qxfer_spu): Ditto.
2666 (linux_qxfer_libraries_svr4): Ditto.
2667 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2668 moved to inferiors.h.
2669 (get_lwp): Delete.
2670 (get_thread_lwp): Update.
2671 (struct lwp_info): Delete member "entry". Simplify comment for
2672 member "thread".
2673 (all_lwps): Delete.
2674 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2675 current_inferior directly.
2676 (update_watch_registers_callback): Update, "entry" parameter is a
2677 struct thread_info * now. Fetch pid from thread.
2678 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2679 (mips_insert_point): Fetch lwpid from current_inferior.
2680 Pass &all_threads to find_inferior, not &all_lwps.
2681 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2682 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2683 directly.
2684 (mips_stopped_data_address): Ditto.
2685 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2686 directly.
2687 * linux-tile-low.c (tile_arch_setup): Ditto.
2688 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2689 (update_debug_registers_callback): Update, "entry" parameter is a
2690 struct thread_info * now. Fetch pid from thread.
2691 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2692 Pass &all_threads to find_inferior, not &all_lwps.
2693 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2694 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2695 Pass &all_threads to find_inferior, not &all_lwps.
2696 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2697 (i386_dr_low_get_status): Ditto.
2698 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2699 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2700 (x86_linux_read_description): Ditto.
2701 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2702
3b8361aa
DE
27032014-02-20 Doug Evans <dje@google.com>
2704
2705 * inferiors.c (get_first_inferior): Fix buglet.
2706
f7667f0d
DE
27072014-02-19 Doug Evans <dje@google.com>
2708
2709 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2710 * inferiors.c (add_thread): Change result type to struct thread_info *.
2711 All callers updated.
2712 (add_lwp): Call add_thread here instead of in callers.
2713 All callers updated.
2714 * linux-low.h (get_lwp_thread): Rewrite.
2715 (struct lwp_info): New member "thread".
2716
b3312d80
DE
27172014-02-19 Doug Evans <dje@google.com>
2718
2719 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2720 All callers updated.
2721
ecc6f45c
DE
27222014-02-19 Doug Evans <dje@google.com>
2723
2724 * inferiors.c (add_thread): Fix whitespace.
2725
649ebbca
DE
27262014-02-19 Doug Evans <dje@google.com>
2727
2728 * dll.c (clear_dlls): Replace accessing list implemention details
2729 with API function.
2730 * gdbthread.h (get_first_thread): Declare.
2731 * inferiors.c (for_each_inferior_with_data): New function.
2732 (get_first_thread): New function.
2733 (find_thread_ptid): Simplify.
2734 (get_first_inferior): New function.
2735 (clear_list): Delete.
2736 (one_inferior_p): New function.
2737 (clear_inferior_list): New function.
2738 (clear_inferiors): Update.
2739 * inferiors.h (for_each_inferior_with_data): Declare.
2740 (clear_inferior_list): Declare.
2741 (one_inferior_p): Declare.
2742 (get_first_inferior): Declare.
2743 * linux-low.c (linux_wait_for_event): Replace accessing list
2744 implemention details with API function.
2745 * server.c (target_running): Ditto.
2746 (accumulate_file_name_length): New function.
2747 (emit_dll_description): New function.
2748 (handle_qxfer_libraries): Replace accessing list implemention
2749 details with API function.
2750 (handle_qxfer_threads_worker): New function.
2751 (handle_qxfer_threads_proper): Replace accessing list implemention
2752 details with API function.
2753 (handle_query): Ditto.
2754 (visit_actioned_threads_callback_ftype): New typedef.
2755 (visit_actioned_threads_data): New struct.
2756 (visit_actioned_threads): Rewrite to be find_inferior callback.
2757 (resume): Call find_inferior.
2758 (handle_status): Replace accessing list implemention
2759 details with API function.
2760 (process_serial_event): Replace accessing list implemention details
2761 with API function.
2762 * target.c (set_desired_inferior): Replace accessing list implemention
2763 details with API function.
2764 * tracepoint.c (same_process_p): New function.
2765 (gdb_agent_about_to_close): Replace accessing list implemention
2766 details with API function.
2767 * win32-low.c (child_delete_thread): Replace accessing list
2768 implemention details with API function.
2769 (match_dll_by_basename): New function.
2770 (dll_is_loaded_by_basename): New function.
2771 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2772 details call to dll_is_loaded_by_basename.
2773
80894984
DE
27742014-02-19 Doug Evans <dje@google.com>
2775
2776 * dll.h (struct dll_info): Add comment.
2777 * gdbthread.h (struct thread_info): Add comment.
2778 (current_ptid): Simplify.
2779 * inferiors.c (add_process): Update.
2780 (remove_process): Update.
2781 * inferiors.h (struct process_info): Rename member "head" to "entry".
2782 * linux-low.c (delete_lwp): Update.
2783 (add_lwp): Update.
2784 (last_thread_of_process_p): Update.
2785 (kill_one_lwp_callback, linux_kill): Update.
2786 (status_pending_p_callback): Update.
2787 (wait_for_sigstop): Update. Simplify read of ptid.
2788 (start_step_over): Update.
2789 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2790 (get_lwp_thread): Update.
2791 (struct lwp_info): Rename member "head" to "entry".
2792 * regcache.h (inferior_list_entry): Delete.
2793 * server.c (kill_inferior_callback): Update.
2794 (detach_or_kill_inferior_callback): Update.
2795 (print_started_pid): Update.
2796 (print_attached_pid): Update.
2797 (process_serial_event): Simplify read of ptid.
2798 * thread-db.c (thread_db_create_event): Update.
2799 (thread_db_get_tls_address): Update.
2800 * win32-low.c (current_inferior_ptid): Simplify.
2801
46917d26
TT
28022014-02-19 Tom Tromey <tromey@redhat.com>
2803
2804 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2805 argument.
2806 (target_supports_btrace): Update.
2807
0759a81e
YQ
28082014-02-14 Yao Qi <yao@codesourcery.com>
2809
2810 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2811 (rsp-low-ipa.o): New target.
2812
a7191e8b
TT
28132014-02-12 Tom Tromey <tromey@redhat.com>
2814
2815 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2816 convert_ascii_to_int.
2817 * regcache.c (registers_to_string): Likewise.
2818 * remote-utils.c (decode_M_packet): Likewise.
2819 * server.c (process_serial_event): Likewise.
2820
ff0e980e
TT
28212014-02-12 Tom Tromey <tromey@redhat.com>
2822
2823 * server.c (handle_query, handle_v_run): Use hex2bin, not
2824 unhexify.
2825 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2826
e9371aff
TT
28272014-02-12 Tom Tromey <tromey@redhat.com>
2828
2829 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2830 convert_int_to_ascii.
2831 * regcache.c (registers_to_string, collect_register_as_string):
2832 Likewise.
2833 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2834 Likewise.
2835 * server.c (process_serial_event): Likewise.
2836 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2837 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2838
971dc0b8
TT
28392014-02-12 Tom Tromey <tromey@redhat.com>
2840
2841 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2842 bin2hex, not hexify.
2843 * tracepoint.c (cmd_qtstatus): Likewise.
2844
0a822afb
TT
28452014-02-12 Tom Tromey <tromey@redhat.com>
2846
2847 * remote-utils.c (monitor_output): Pass explicit length to
2848 hexify.
2849
9c3d6531
TT
28502014-02-12 Tom Tromey <tromey@redhat.com>
2851
2852 * tracepoint.c: Include rsp-low.h.
2853 * server.c: Include rsp-low.h.
2854 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2855 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2856 declare.
2857 * remote-utils.c: Include rsp-low.h.
2858 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2859 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2860 (convert_int_to_ascii, convert_ascii_to_int): Move to
2861 common/rsp-low.c.
2862 * regcache.c: Include rsp-low.h.
2863 * ax.c: Include rsp-low.h.
2864 * Makefile.in (SFILES): Add common/rsp-low.c.
2865 (OBS): Add rsp-low.o.
2866 (rsp-low.o): New target.
2867
01fd3ea5
TT
28682014-02-12 Tom Tromey <tromey@redhat.com>
2869
2870 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2871 Include print-utils.h.
2872 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2873 (plongest, thirty_two, phex_nz): Remove.
2874 * Makefile.in (SFILES): Add common/print-utils.c.
2875 (OBS): Add print-utils.o.
2876 (print-utils-ipa.o): New target.
2877 (print-utils.o): New target.
2878 (IPA_OBJS): Add print-utils-ipa.o.
2879
e99dc820
TT
28802014-02-06 Tom Tromey <tromey@redhat.com>
2881
2882 * Makefile.in (SFILES): Fix indentation.
2883
ee1e2d4f
DE
28842014-02-05 Doug Evans <dje@google.com>
2885
2886 * linux-low.c (linux_wait_for_event): Improve comment.
2887 (linux_wait_1): Keep current_inferior in sync with event_child.
2888
f5a02773
DE
28892014-01-22 Doug Evans <dje@google.com>
2890
2891 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2892
87ce2a04
DE
28932014-01-22 Doug Evans <dje@google.com>
2894
2895 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2896 * configure: Regenerate.
2897 * config.in: Regenerate.
2898 * Makefile.in (SFILES): Add debug.c.
2899 (OBS): Add debug.o.
2900 * debug.c: New file.
2901 * debug.h: New file.
2902 * linux-aarch64-low.c (*): Update all debugging printfs to use
2903 debug_printf instead of fprintf.
2904 * linux-arm-low.c (*): Ditto.
2905 * linux-cris-low.c (*): Ditto.
2906 * linux-crisv32-low.c (*): Ditto.
2907 * linux-m32r-low.c (*): Ditto.
2908 * linux-sparc-low.c (*): Ditto.
2909 * linux-x86.c (*): Ditto.
2910 * linux-low.c (*): Ditto.
2911 (linux_wait_1): Add calls to debug_enter, debug_exit.
2912 (linux_wait): Remove redundant debugging printf.
2913 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2914 (linux_resume, unstop_all_lwps): Ditto.
2915 * mem-break.c (*): Update all debugging printfs to use
2916 debug_printf instead of fprintf.
2917 * remote-utils.c (*): Ditto.
2918 * thread-db.c (*): Ditto.
2919 * server.c #include <ctype.h>, "gdb_vecs.h".
2920 (debug_threads): Moved to debug.c.
2921 (*): Update all debugging printfs to use debug_printf instead of
2922 fprintf.
2923 (start_inferior): Replace call to fflush with call to debug_flush.
2924 (monitor_show_help): Mention set debug-format.
2925 (parse_debug_format_options): New function.
2926 (handle_monitor_command): Handle "monitor set debug-format".
2927 (gdbserver_usage): Mention --debug-format.
2928 (main): Parse --debug-format.
2929 * server.h (debug_threads): Declaration moved to debug.h.
2930 #include "debug.h".
2931 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2932 trace_debug_1 that uses debug_printf.
2933 (tracepoint_look_up_symbols): Update all debugging printfs to use
2934 debug_printf instead of fprintf.
2935
e671835b
BS
29362014-01-20 Baruch Siach <baruch@tkos.co.il>
2937
2938 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2939 sys/ptrace.h.
2940
b5737fa9
PA
29412014-01-17 Pedro Alves <palves@redhat.com>
2942
ea38d2a9 2943 PR build/16445
c7faa97a
PA
2944 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2945 defined after including gdb_proc_service.h.
b5737fa9 2946
40ed484e
DE
29472014-01-16 Doug Evans <dje@google.com>
2948
2949 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2950 (match_dll): Use it.
2951
969c39fb
MM
29522014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2953
2954 * target.h (target_ops) <read_btrace>: Change parameters and
2955 return type to allow error reporting.
2956 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2957 trace reading errors on.
2958 * linux-low.c (linux_low_read_btrace): Pass trace reading
2959 errors on.
2960 (linux_low_disable_btrace): New.
2961
ab7f45ba
DE
29622014-01-15 Doug Evans <dje@google.com>
2963
2964 * inferiors.c (thread_id_to_gdb_id): Delete.
2965 * inferiors.h (thread_id_to_gdb_id): Delete.
2966
66af0f44
EZ
29672014-01-13 Eli Zaretskii <eliz@gnu.org>
2968
2969 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2970 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2971 versions.
2972
9939e131
PA
29732014-01-08 Pedro Alves <palves@redhat.com>
2974
2975 * server.c (handle_status): Don't discard previous queued stop
2976 replies or thread's pending status here.
2977 (main) <disconnection>: Do it here instead.
2978
b7ea362b
PA
29792014-01-08 Pedro Alves <palves@redhat.com>
2980
2981 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2982 * server.c (visit_actioned_threads, handle_pending_status): New
2983 function.
2984 (handle_v_cont): Factor out parts to ...
2985 (resume): ... this new function. If in all-stop, and a thread
2986 being resumed has a pending status, report it without actually
2987 resuming.
2988 (myresume): Adjust to use the new 'resume' function.
2989 (clear_pending_status_callback, set_pending_status_callback)
2990 (find_status_pending_thread_callback): New functions.
2991 (handle_status): Handle the case of multiple threads having
2992 interesting statuses to report. Report threads' real last signal
2993 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2994 with an interesting thread to report the status for, instead of
2995 always reporting the status of the first thread.
2996
28498c42
JB
29972014-01-01 Joel Brobecker <brobecker@adacore.com>
2998
2999 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3000 * gdbreplay.c (gdbreplay_version): Likewise.
3001
f45c82da
YZ
30022013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3003
3004 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3005 iov.iov_len with the real length in use.
3006
379a5e2d
JB
30072013-12-13 Joel Brobecker <brobecker@adacore.com>
3008
3009 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3010 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3011 for all targets that use win32-low.c.
3012 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3013 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3014
4210d83e
PA
30152013-12-13 Pedro Alves <palves@redhat.com>
3016
3017 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3018 if equal to TARGET_WAITKIND_LOADED.
3019 * win32-low.c (cached_status): New static global.
3020 (win32_wait): Add declaration.
3021 (do_initial_child_stuff): Flush all initial pending debug events
3022 up to the initial breakpoint.
3023 (win32_wait): If CACHED_STATUS was set, return that instead
3024 of doing a real wait. Remove the code resuming the execution
3025 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3026 during the initial phase. Also remove the code changing
3027 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3028 TARGET_WAITKIND_STOPPED.
3029
e7f0d979
YQ
30302013-12-11 Yao Qi <yao@codesourcery.com>
3031
3032 * notif.c (handle_notif_ack): Return 0 if no notification
3033 matches.
3034
ebcf782c
DE
30352013-11-20 Doug Evans <dje@google.com>
3036
3037 * linux-low.c (linux_set_resume_request): Fix comment.
3038
20ad9378
DE
30392013-11-20 Doug Evans <dje@google.com>
3040
3041 * linux-low.c (resume_status_pending_p): Tweak comment.
3042
a196ebeb
WT
30432013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3044
3045 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3046 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3047 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3048 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3049 (srv_amd64_regobj): Add amd64-mpx.o.
3050 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3051 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3052 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3053 * i387-fp.c (num_pl_bnd_register) Added constant.
3054 (num_pl_bnd_cfg_registers) Added constant.
3055 (struct i387_xsave) Added reserved area and MPX fields.
3056 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3057 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3058 function.
3059 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3060 (init_registers_amd64_mpx_linux): Declare new function.
3061 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3062 (x86_64_regmap): Add MPX registers.
3063 (x86_linux_read_description): Add MPX case.
3064 (initialize_low_arch): Initialize MPX targets.
3065
0080a2f6
TT
30662013-11-18 Tom Tromey <tromey@redhat.com>
3067
3068 * configure: Rebuild.
3069 * configure.ac: Don't check for stdlib.h.
3070 * gdbreplay.c: Unconditionally include stdlib.h.
3071
2978b111
TT
30722013-11-18 Tom Tromey <tromey@redhat.com>
3073
3074 * config.in: Rebuild.
3075 * configure: Rebuild.
3076 * configure.ac: Don't use AC_HEADER_DIRENT.
3077
a3d08894
TT
30782013-11-18 Tom Tromey <tromey@redhat.com>
3079
3080 * server.h: Don't check HAVE_STRING_H.
3081 * gdbreplay.c: Don't check HAVE_STRING_H.
3082 * configure: Rebuild.
3083
0a5dd17d
TT
30842013-11-18 Tom Tromey <tromey@redhat.com>
3085
3086 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3087 LIBGNU.
3088
1bd2f0ba
TT
30892013-11-08 Tom Tromey <tromey@redhat.com>
3090
3091 * configure, config.in: Rebuild.
3092 * configure.ac: Remove unused configury.
3093
3266f10b
TT
30942013-11-08 Tom Tromey <tromey@redhat.com>
3095
3096 * acinclude.m4: Include common.m4, codeset.m4.
3097 * configure, config.in: Rebuild.
3098 * configure.ac: Use GDB_AC_COMMON.
3099
6682d959
AA
31002013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3101
3102 * linux-s390-low.c (HWCAP_S390_TE): New define.
3103 (s390_arch_setup): Consider the TE field in the HWCAP for
3104 determining 'have_regset_tdb'.
3105
fd0a4d76
SDJ
31062013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3107
3108 PR gdb/16014
3109 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3110 call to sizeof.
3111
1a3d890b
PA
31122013-10-02 Pedro Alves <palves@redhat.com>
3113
3114 * server.c (process_serial_event): Don't output "GDBserver
3115 exiting" if GDB is connected through stdio.
3116 * target.c (mywait): Likewise, be silent if GDB is connected
3117 through stdio.
3118
97ad4581
JB
31192013-10-01 Joel Brobecker <brobecker@adacore.com>
3120
3121 * lynx-low.c (lynx_add_threads_after_attach): New function.
3122 (lynx_attach): Remove call to add_thread. Add call to
3123 lynx_add_threads_after_attach instead.
3124
5b4e221c
MF
31252013-09-28 Mike Frysinger <vapier@gentoo.org>
3126
3127 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3128 * config.in, configure: Regenerated.
3129
ee47b2f8
YQ
31302013-09-18 Yao Qi <yao@codesourcery.com>
3131
3132 PR server/15959
3133 * server.c (start_inferior): Clear 'resume_info'.
3134
d6707650 31352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3136
d6707650
JW
3137 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3138 for each register.
3139
9243dd0e 31402013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3141
9243dd0e
JW
3142 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3143 linux-tile-low.o to srv_tgtobj.
3144
c623a6ef
WN
31452013-09-16 Will Newton <will.newton@linaro.org>
3146
3147 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3148 out regs.
3149
fb71d39e
PA
31502013-09-06 Pedro Alves <palves@redhat.com>
3151
3152 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3153 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3154 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3155 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3156 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3157 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3158
8e7e9910
PA
31592013-09-06 Pedro Alves <palves@redhat.com>
3160
3161 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3162 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3163
7c3a12ca
PA
31642013-09-06 Pedro Alves <palves@redhat.com>
3165
3166 * linux-amd64-ipa.c: Include tracepoint.h.
3167 * linux-i386-ipa.c: Include tracepoint.h.
3168
8eb3d7b6
RW
31692013-09-06 Ricard Wanderlof <ricardw@axis.com>
3170
3171 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3172 (ps_get_thread_area): New function.
3173
eddddb9d
RW
31742013-09-06 Ricard Wanderlof <ricardw@axis.com>
3175
3176 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3177 (initialize_low_arch): Call init_registers_crisv32 rather than
3178 init_register_crisv32.
3179
533b0600
PA
31802013-09-05 Pedro Alves <palves@redhat.com>
3181
3182 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3183 to ...
3184 * hostio.h: ... this new file.
3185 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3186 win32-low.c: Include hostio.h.
3187
0ce3d3b5
PA
31882013-09-05 Pedro Alves <palves@redhat.com>
3189
3190 * server.h (gdb_client_data, handler_func, callback_handler_func)
3191 (delete_file_handler, add_file_handler, append_callback_event)
3192 (delete_callback_event, start_event_loop, initialize_event_loop):
3193 Move to event-loop.h and include it.
3194 * event-loop.h: New file.
3195
799cdc37
PA
31962013-09-05 Pedro Alves <palves@redhat.com>
3197
3198 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3199 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3200 (loaded_dll, unloaded_dll): Move to ...
3201 * dll.h: ... this new file.
3202 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3203
6a6bbd9d
PA
32042013-09-05 Pedro Alves <palves@redhat.com>
3205
3206 * server.h (current_process, get_thread_process, all_processes)
3207 (add_inferior_to_list, for_each_inferior, current_inferior)
3208 (remove_inferior, add_process, remove_process, find_process_pid)
3209 (have_started_inferiors_p, have_attached_inferiors_p)
3210 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3211 (clear_inferiors, find_inferior, find_inferior_id)
3212 (inferior_target_data, set_inferior_target_data)
3213 (inferior_regcache_data, set_inferior_regcache_data): Move to
3214 inferiors.h, and include it.
3215 * inferiors.h: New file.
3216
f699aaba
PA
32172013-09-05 Pedro Alves <palves@redhat.com>
3218
3219 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3220 Move ...
72f4393d 3221 * ax.h: ... here.
f699aaba 3222
c144c7a0
PA
32232013-09-05 Pedro Alves <palves@redhat.com>
3224
3225 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3226 tracepoint.h.
3227 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3228 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3229 (handle_tracepoint_general_set, handle_tracepoint_query)
3230 (tracepoint_finished_step, tracepoint_was_hit)
3231 (release_while_stepping_state_list, current_traceframe)
3232 (in_readonly_region, traceframe_read_mem)
3233 (fetch_traceframe_registers, traceframe_read_sdata)
3234 (traceframe_read_info, struct fast_tpoint_collect_status)
3235 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3236 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3237 (supply_fast_tracepoint_registers)
3238 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3239 (ipa_tdesc, claim_trampoline_space)
3240 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3241 (agent_mem_read, agent_get_trace_state_variable_value)
3242 (agent_set_trace_state_variable_value, agent_tsv_read)
3243 (agent_mem_read_string, get_raw_reg_func_addr)
3244 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3245 * tracepoint.h: ... this new file.
3246
ff42e6ab
PA
32472013-09-05 Pedro Alves <palves@redhat.com>
3248
3249 * server.h (perror_with_name, error, fatal, warning, paddress)
3250 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3251 include it.
3252 * utils.h: New file.
3253
541af0f4
PA
32542013-09-05 Pedro Alves <palves@redhat.com>
3255
3256 * server.h (remote_debug, noack_mode, transport_is_reliable)
3257 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3258 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3259 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3260 (write_enn, initialize_async_io, enable_async_io)
3261 (disable_async_io, check_remote_input_interrupt_request)
3262 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3263 (dead_thread_notify, prepare_resume_reply)
3264 (decode_address_to_semicolon, decode_address, decode_m_packet)
3265 (decode_M_packet, decode_X_packet, decode_xfer_write)
3266 (decode_search_memory_packet, unhexify, hexify)
3267 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3268 (look_up_one_symbol, relocate_instruction)
3269 (monitor_output): Move to remote-utils.h, and include it.
3270 * remote-utils.h: New file.
3271
eebdf26b
PA
32722013-09-05 Pedro Alves <palves@redhat.com>
3273
3274 * server.h (_): Delete.
3275
3aafd2ff
PA
32762013-09-02 Pedro Alves <palves@redhat.com>
3277
3278 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3279 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3280 allocated.
3281 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3282
cee83bcb
PM
32832013-09-02 Pierre Muller <muller@sourceware.org>
3284
3285 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3286 or WriteProcessMemory complete successfully and handle
3287 ERROR_PARTIAL_COPY error.
3288
9a13b2fa
PA
32892013-09-02 Pedro Alves <palves@redhat.com>
3290
3291 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3292 error instead of EIO.
3293
602e3198
JK
32942013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3295
3296 PR server/15604
3297 * linux-low.c: Include filestuff.h.
3298 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3299 * lynx-low.c: Include filestuff.h.
3300 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3301 * server.c: Include filestuff.h.
3302 (main): Call notice_open_fds.
3303 * spu-low.c: Include filestuff.h.
3304 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3305
96d7229d
LM
33062013-08-22 Luis Machado <lgustavo@codesourcery.com>
3307
3308 * Makefile.in: Explain why ../target and ../nat are not
3309 listed as include file search paths.
3310 (linux-waitpid.o): New object file rule.
3311 * configure.srv (srv_native_linux_obj): New variable.
3312 Replace all occurrences of linux native object files with
3313 $srv_native_linux_obj.
3314 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3315 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3316 (linux_enable_event_reporting): Remove declaration.
3317 (my_waitpid): Moved to common/linux-waitpid.c.
3318 (linux_wait_for_event): Pass ptid when calling
3319 linux_enable_event_reporting.
3320 (linux_supports_tracefork_flag): Remove.
3321 (linux_enable_event_reporting): Likewise.
3322 (linux_tracefork_grandchild): Remove.
3323 (STACK_SIZE): Moved to common/linux-ptrace.c.
3324 (linux_tracefork_child): Remove.
3325 (linux_test_for_tracefork): Remove.
3326 (linux_look_up_symbols): Call linux_supports_traceclone.
3327 (initialize_low): Remove call to linux_test_for_tracefork.
3328 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3329 common/linux-ptrace.h.
3330 (PTRACE_TYPE_ARG4): Likewise.
3331 Include linux-ptrace.h.
3332
32940073
PA
33332013-08-21 Pedro Alves <palves@redhat.com>
3334
3335 * config.in: Renegerate.
3336
33b60d58 33372013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3338
33b60d58
LM
3339 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3340 (SFILES): Remove $(srcdir)/common/target-common.c and
3341 add $(srcdir)/target/waitstatus.c.
3342 (OBS): Remove target-common.o and add waitstatus.o.
3343 (server_h): Remove $(srcdir)/../common/target-common.h and
3344 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3345 and $(srcdir)/../target/waitstatus.h.
3346 (target-common.o): Remove.
3347 (waitstatus.o): New target object file.
3348 * target.h: Do not include target-common.h and
3349 include target/resume.h, target/wait.h and
3350 target/waitstatus.h.
3351
b8e1b30e
LM
33522013-08-13 Luis Machado <lgustavo@codesourcery.com>
3353
3354 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3355 to PTRACE_TYPE_ARG3.
3356 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3357 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3358 PTRACE_TYPE_ARG4.
3359 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3360 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3361
7a60ad40
YQ
33622013-07-27 Jie Zhang <jie@codesourcery.com>
3363 Daniel Jacobowitz <dan@codesourcery.com>
3364 Yao Qi <yao@codesourcery.com>
3365
3366 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3367 (mips-linux-watch.o): New rule.
3368 (mips_linux_watch_h): New variable.
3369 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3370 srv_tgtobj.
3371 * linux-mips-low.c: Include mips-linux-watch.h.
3372 (struct arch_process_info, struct arch_lwp_info): New.
3373 (update_watch_registers_callback): New function.
3374 (mips_linux_new_process, mips_linux_new_thread) New functions.
3375 (mips_linux_prepare_to_resume, mips_insert_point): New
3376 functions.
3377 (mips_remove_point, mips_stopped_by_watchpoint): New
3378 functions.
3379 (rsp_bp_type_to_target_hw_bp_type): New function.
3380 (mips_stopped_data_address): New function.
3381 (the_low_target): Add watchpoint support functions.
3382
de6f69ad
YQ
33832013-07-27 Yao Qi <yao@codesourcery.com>
3384
3385 * i386-low.c: Include break-common.h.
3386 (enum target_hw_bp_type): Remove.
3387
3360c0bf
LM
33882013-07-24 Luis Machado <lgustavo@codesourcery.com>
3389
3390 * Makefile.in (SFILES): /common/target-common.c.
3391 (OBS): Add target-common.o.
3392 (server_h): Add $(srcdir)/../common/target-common.h.
3393 (target-common.o): New target.
3394 * server.c (queue_stop_reply_callback): Free
3395 status string after use.
3396 * target.c (target_waitstatus_to_string): Remove.
3397 * target.h: Include target-common.h.
3398 (resume_kind): Likewise.
3399 (target_waitkind): Likewise.
3400 (target_waitstatus): Likewise.
3401 (TARGET_WNOHANG): Likewise.
3402
bd885420
YQ
34032013-07-04 Yao Qi <yao@codesourcery.com>
3404
3405 * Makefile.in (host_alias): Use @host_noncanonical@.
3406 (target_alias): Use @target_noncanonical@.
3407 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3408 ACX_NONCANONICAL_HOST.
3409 * configure: Regenerated.
3410
3411 Revert:
3412 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3413
3414 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3415 * configure: Rebuild.
3416 * Makefile.in (version_host, version_target): Get from configure.
3417 (version.c): Use $(version_host) and $(version_target).
3418
17ef446e
PA
34192013-07-03 Pedro Alves <palves@redhat.com>
3420
3421 * Makefile.in (config.status): Depend on development.sh.
3422 * acinclude.m4: Include libmcheck.m4.
3423 * configure: Regenerate.
3424
7a9a7487
MG
34252013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3426
3427 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3428 attribute inside the parentheses.
3429 (winapi_DebugSetProcessKillOnExit): Ditto.
3430 (winapi_DebugBreakProcess): Ditto.
3431 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3432
49b64de6
MG
34332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3434
3435 * notif.h (notif_event): Add a dummy member to avoid compiler
3436 errors.
3437
d5749ee7
PA
34382013-07-01 Pedro Alves <palves@redhat.com>
3439
3440 * hostio.c (HOSTIO_PATH_MAX): Define.
3441 (require_filename, handle_open, handle_unlink, handle_readlink):
3442 Use it.
3443
d8d2a3ee
PA
34442013-07-01 Pedro Alves <palves@redhat.com>
3445
3446 * server.h: Include "pathmax.h".
3447 * linux-low.c: Don't include sys/param.h.
3448 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3449 MAXPATHLEN.
3450 * win32-low.c: Don't include sys/param.h.
3451 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3452
bc7dea8d
PA
34532013-07-01 Pedro Alves <palves@redhat.com>
3454
3455 * event-loop.c: Don't check HAVE_UNISTD_H before including
3456 <unistd.h>.
3457 * gdbreplay.c: Likewise.
3458 * remote-utils.c: Likewise.
3459 * server.c: Likewise.
3460 * configure.ac: Don't check for unistd.h.
3461 * configure: Regenerate.
3462
d6c2da54
TT
34632013-06-28 Tom Tromey <tromey@redhat.com>
3464
3465 * Makefile.in (version.c): Use version.in, not
3466 common/version.in.
3467
257b6bec
MG
34682013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3469
3470 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3471 * configure: Rebuild.
3472 * Makefile.in (version_host, version_target): Get from configure.
3473 (version.c): Use $(version_host) and $(version_target).
3474
86ebe149
DK
34752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3476
3477 Fix trace-status to output user name without trailing colon.
3478 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3479
f30aa5af
DK
34802013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3481
3482 Fix trace-status to output proper start-time and stop-time.
3483 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3484 output start time and stop time in hex as gdb expects.
3485
28a93511
YQ
34862013-06-26 Pedro Alves <pedro@codesourcery.com>
3487
3488 * tracepoint.c (build_traceframe_info_xml): Output trace state
3489 variables present in the trace buffer.
3490
01208463
TT
34912013-06-24 Tom Tromey <tromey@redhat.com>
3492
3493 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3494 create-version.sh.
3495 (version.o): Remove.
3496 * gdbreplay.c: Include version.h.
3497 (version, host_name): Don't declare.
3498 * server.h: Include version.h.
3499 (version, host_name): Don't declare.
3500
760256f9
PA
35012013-06-12 Pedro Alves <palves@redhat.com>
3502
3503 * linux-x86-low.c (linux_is_elf64): Delete global.
3504 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3505 with local linux_pid_exe_is_elf_64_file use.
3506
030031ee
PA
35072013-06-11 Pedro Alves <palves@redhat.com>
3508
3509 * linux-low.c (regset_disabled, disable_regset): New functions.
3510 (regsets_fetch_inferior_registers)
3511 (regsets_store_inferior_registers): Use them.
3512 (initialize_regsets_info); Don't allocate the disabled_regsets
3513 array here.
3514 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3515 comment.
3516
5da6eb0a
PA
35172013-06-11 Pedro Alves <palves@redhat.com>
3518
3519 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3520 xmalloc.
3521
7e5aaa09
PA
35222013-06-11 Pedro Alves <palves@redhat.com>
3523
3524 * linux-x86-low.c (initialize_low_arch): Call
3525 init_registers_x32_avx_linux.
3526
d878444c
JK
35272013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3528
3529 Fix compatibility with Android Bionic.
3530 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3531 it is not empty.
3532
3aee8918
PA
35332013-06-07 Pedro Alves <palves@redhat.com>
3534
5f2b57b5 3535 PR server/14823
3aee8918
PA
3536 * Makefile.in (OBS): Add tdesc.o.
3537 (IPA_OBJS): Add tdesc-ipa.o.
3538 (tdesc-ipa.o): New rule.
3539 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3540 interface.
3541 * linux-low.c (new_inferior): Delete.
3542 (disabled_regsets, num_regsets): Delete.
3543 (linux_add_process): Adjust to set the new per-process
3544 new_inferior flag.
3545 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3546 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3547 was a stop. When calling arch_setup, switch the current inferior
3548 to the thread that got an event.
3549 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3550 (regsets_fetch_inferior_registers)
3551 (regsets_store_inferior_registers): New regsets_info parameter.
3552 Adjust to use it.
3553 (linux_register_in_regsets): New regs_info parameter. Adjust to
3554 use it.
3555 (register_addr, fetch_register, store_register): New usrregs_info
3556 parameter. Adjust to use it.
3557 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3558 parameter regs_info. Adjust to use it.
3559 (linux_fetch_registers): Get the current inferior's regs_info, and
3560 adjust to use it.
3561 (linux_store_registers): Ditto.
3562 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3563 (initialize_low): Don't initialize the target_regsets here. Call
3564 initialize_low_arch.
3565 * linux-low.h (target_regsets): Delete declaration.
3566 (struct regsets_info): New.
3567 (struct usrregs_info): New.
3568 (struct regs_info): New.
3569 (struct process_info_private) <new_inferior>: New field.
3570 (struct linux_target_ops): Delete the num_regs, regmap, and
3571 regset_bitmap fields. New field regs_info.
3572 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3573 * i387-fp.c (num_xmm_registers): Delete.
3574 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3575 calls to new interface.
3576 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3577 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3578 Infer the number of xmm registers from the regcache's target
3579 description.
3580 * i387-fp.h (num_xmm_registers): Delete.
3581 * inferiors.c (add_thread): Don't install the thread's regcache
3582 here.
3583 * proc-service.c (gregset_info): Fetch the current inferior's
3584 regs_info. Adjust to use it.
3585 * regcache.c: Include tdesc.h.
3586 (register_bytes, reg_defs, num_registers)
3587 (gdbserver_expedite_regs): Delete.
3588 (get_thread_regcache): If the thread doesn't have a regcache yet,
3589 create one, instead of aborting gdbserver.
3590 (regcache_invalidate_one): Rename to ...
3591 (regcache_invalidate_thread): ... this.
3592 (regcache_invalidate_one): New.
3593 (regcache_invalidate): Only invalidate registers of the current
3594 process.
3595 (init_register_cache): Add target_desc parameter, and use it.
3596 (new_register_cache): Ditto. Assert the target description has a
3597 non zero registers_size.
3598 (regcache_cpy): Add assertions. Adjust.
3599 (realloc_register_cache, set_register_cache): Delete.
3600 (registers_to_string, registers_from_string): Adjust.
3601 (find_register_by_name, find_regno, find_register_by_number)
3602 (register_cache_size): Add target_desc parameter, and use it.
3603 (free_register_cache_thread, free_register_cache_thread_one)
3604 (regcache_release, register_cache_size): New.
3605 (register_size): Add target_desc parameter, and use it.
3606 (register_data, supply_register, supply_register_zeroed)
3607 (supply_regblock, supply_register_by_name, collect_register)
3608 (collect_register_as_string, collect_register_by_name): Adjust.
3609 * regcache.h (struct target_desc): Forward declare.
3610 (struct regcache) <tdesc>: New field.
3611 (init_register_cache, new_register_cache): Add target_desc
3612 parameter.
3613 (regcache_invalidate_thread): Declare.
3614 (regcache_invalidate_one): Delete declaration.
3615 (regcache_release): Declare.
3616 (find_register_by_number, register_cache_size, register_size)
3617 (find_regno): Add target_desc parameter.
3618 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3619 declarations.
3620 * remote-utils.c: Include tdesc.h.
3621 (outreg, prepare_resume_reply): Adjust.
3622 * server.c: Include tdesc.h.
3623 (gdbserver_xmltarget): Delete declaration.
3624 (get_features_xml, process_serial_event): Adjust.
3625 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3626 declare.
3627 (struct process_info) <tdesc>: New field.
3628 (ipa_tdesc): Declare.
3629 * tdesc.c: New file.
3630 * tdesc.h: New file.
3631 * tracepoint.c: Include tdesc.h.
3632 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3633 (get_context_regcache): Adjust to pass ipa_tdesc down.
3634 (do_action_at_tracepoint): Adjust to get the register cache size
3635 from the context regcache's description.
3636 (traceframe_walk_blocks): Adjust to get the register cache size
3637 from the current trace frame's description.
3638 (traceframe_get_pc): Adjust to get current trace frame's
3639 description and pass it down.
3640 (gdb_collect): Adjust to get the register cache size from the
3641 IPA's description.
3642 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3643 (gdbserver_xmltarget): Delete.
3644 (initialize_low_tracepoint): Set the ipa's target description.
3645 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3646 (initialize_low_tracepoint): Set the ipa's target description.
3647 * linux-x86-low.c: Include tdesc.h.
3648 [__x86_64__] (is_64bit_tdesc): New.
3649 (ps_get_thread_area, x86_get_thread_area): Use it.
3650 (i386_cannot_store_register): Rename to ...
3651 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3652 (i386_cannot_fetch_register): Rename to ...
3653 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3654 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3655 to new interface.
3656 (target_regsets): Rename to ...
3657 (x86_regsets): ... this.
3658 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3659 interface.
3660 (x86_siginfo_fixup): Use is_64bit_tdesc.
3661 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3662 (tdesc_x32_avx_linux, tdesc_x32_linux)
3663 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3664 Declare.
3665 (x86_linux_update_xmltarget): Delete.
3666 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3667 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3668 (AMD64_LINUX_USER64_CS): New.
3669 (x86_linux_read_description): New, based on
3670 x86_linux_update_xmltarget.
3671 (same_process_callback): New.
3672 (x86_arch_setup_process_callback): New.
3673 (x86_linux_update_xmltarget): New.
3674 (x86_regsets_info): New.
3675 (amd64_linux_regs_info): New.
3676 (i386_linux_usrregs_info): New.
3677 (i386_linux_regs_info): New.
3678 (x86_linux_regs_info): New.
3679 (x86_arch_setup): Reimplement.
3680 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3681 (x86_emit_ops): Ditto.
3682 (the_low_target): Adjust. Install x86_linux_regs_info,
3683 x86_cannot_fetch_register, and x86_cannot_store_register.
3684 (initialize_low_arch): New.
3685 * linux-ia64-low.c (tdesc_ia64): Declare.
3686 (ia64_fetch_register): Adjust.
3687 (ia64_usrregs_info, regs_info): New globals.
3688 (ia64_regs_info): New function.
3689 (the_low_target): Adjust.
3690 (initialize_low_arch): New function.
3691 * linux-sparc-low.c (tdesc_sparc64): Declare.
3692 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3693 Adjust.
3694 (sparc_arch_setup): New function.
3695 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3696 (the_low_target): Adjust.
3697 (initialize_low_arch): New function.
3698 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3699 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3700 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3701 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3702 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3703 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3704 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3705 (tdesc_powerpc_isa205_vsx64l): Declare.
3706 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3707 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3708 (ppc_set_pc, ppc_get_hwcap): Adjust.
3709 (ppc_usrregs_info): Forward declare.
3710 (!__powerpc64__) ppc_regmap_adjusted: New global.
3711 (ppc_arch_setup): Adjust to the current process'es target
3712 description.
3713 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3714 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3715 (ppc_store_evrregset): Adjust.
3716 (target_regsets): Rename to ...
3717 (ppc_regsets): ... this, and make static.
3718 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3719 (ppc_regs_info): New function.
3720 (the_low_target): Adjust.
3721 (initialize_low_arch): New function.
3722 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3723 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3724 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3725 (tdesc_s390x_linux64v2): Declare.
3726 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3727 (s390_fill_gregset, s390_store_last_break): Adjust.
3728 (target_regsets): Rename to ...
3729 (s390_regsets): ... this, and make static.
3730 (s390_get_pc, s390_set_pc): Adjust.
3731 (s390_get_hwcap): New target_desc parameter, and use it.
3732 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3733 (s390_arch_setup): Adjust to set the current process'es target
3734 description. Don't adjust the regmap.
3735 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3736 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3737 (regs_info_3264): New globals.
3738 (s390_regs_info): New function.
3739 (the_low_target): Adjust.
3740 (initialize_low_arch): New function.
3741 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3742 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3743 [__mips64] (init_registers_mips_linux)
3744 (init_registers_mips_dsp_linux): Delete defines.
3745 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3746 (have_dsp): New global.
3747 (mips_read_description): New, based on mips_arch_setup.
3748 (mips_arch_setup): Reimplement.
3749 (get_usrregs_info): New function.
3750 (mips_cannot_fetch_register, mips_cannot_store_register)
3751 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3752 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3753 (target_regsets): Rename to ...
3754 (mips_regsets): ... this, and make static.
3755 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3756 (dsp_regs_info, regs_info): New globals.
3757 (mips_regs_info): New function.
3758 (the_low_target): Adjust.
3759 (initialize_low_arch): New function.
3760 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3761 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3762 Declare.
3763 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3764 (arm_read_description): New, with bits factored from
3765 arm_arch_setup.
3766 (arm_arch_setup): Reimplement.
3767 (target_regsets): Rename to ...
3768 (arm_regsets): ... this, and make static.
3769 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3770 (arm_regs_info): New function.
3771 (the_low_target): Adjust.
3772 (initialize_low_arch): New function.
3773 * linux-m68k-low.c (tdesc_m68k): Declare.
3774 (target_regsets): Rename to ...
3775 (m68k_regsets): ... this, and make static.
3776 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3777 (m68k_regs_info): New function.
3778 (m68k_arch_setup): New function.
3779 (the_low_target): Adjust.
3780 (initialize_low_arch): New function.
3781 * linux-sh-low.c (tdesc_sharch): Declare.
3782 (target_regsets): Rename to ...
3783 (sh_regsets): ... this, and make static.
3784 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3785 (sh_regs_info, sh_arch_setup): New functions.
3786 (the_low_target): Adjust.
3787 (initialize_low_arch): New function.
3788 * linux-bfin-low.c (tdesc_bfin): Declare.
3789 (bfin_arch_setup): New function.
3790 (bfin_usrregs_info, regs_info): New globals.
3791 (bfin_regs_info): New function.
3792 (the_low_target): Adjust.
3793 (initialize_low_arch): New function.
3794 * linux-cris-low.c (tdesc_cris): Declare.
3795 (cris_arch_setup): New function.
3796 (cris_usrregs_info, regs_info): New globals.
3797 (cris_regs_info): New function.
3798 (the_low_target): Adjust.
3799 (initialize_low_arch): New function.
3800 * linux-cris-low.c (tdesc_crisv32): Declare.
3801 (cris_arch_setup): New function.
3802 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3803 (cris_regs_info): New function.
3804 (the_low_target): Adjust.
3805 (initialize_low_arch): New function.
3806 * linux-m32r-low.c (tdesc_m32r): Declare.
3807 (m32r_arch_setup): New function.
3808 (m32r_usrregs_info, regs_info): New globals.
3809 (m32r_regs_info): Adjust.
3810 (initialize_low_arch): New function.
3811 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3812 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3813 (tic6x_usrregs_info): Forward declare.
3814 (tic6x_read_description): New function, based on ...
3815 (tic6x_arch_setup): ... this. Reimplement.
3816 (target_regsets): Rename to ...
3817 (tic6x_regsets): ... this, and make static.
3818 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3819 (tic6x_regs_info): New function.
3820 (the_low_target): Adjust.
3821 (initialize_low_arch): New function.
3822 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3823 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3824 (target_regsets): Rename to ...
3825 (xtensa_regsets): ... this, and make static.
3826 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3827 globals.
3828 (xtensa_arch_setup, xtensa_regs_info): New functions.
3829 (the_low_target): Adjust.
3830 (initialize_low_arch): New function.
3831 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3832 (nios2_arch_setup): Set the current process'es tdesc.
3833 (target_regsets): Rename to ...
3834 (nios2_regsets): ... this.
3835 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3836 (nios2_regs_info): New function.
3837 (the_low_target): Adjust.
3838 (initialize_low_arch): New function.
a261b8f5
PA
3839 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3840 (aarch64_arch_setup): Set the current process'es tdesc.
3841 (target_regsets): Rename to ...
3842 (aarch64_regsets): ... this.
3843 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3844 (aarch64_regs_info): New function.
3845 (the_low_target): Adjust.
3846 (initialize_low_arch): New function.
3aee8918
PA
3847 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3848 globals.
3849 (target_regsets): Rename to ...
3850 (tile_regsets): ... this.
3851 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3852 (tile_regs_info): New function.
3853 (tile_arch_setup): Set the current process'es tdesc.
3854 (the_low_target): Adjust.
3855 (initialize_low_arch): New function.
3856 * spu-low.c (tdesc_spu): Declare.
3857 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3858 * win32-arm-low.c (tdesc_arm): Declare.
3859 (arm_arch_setup): New function.
3860 (the_low_target): Install arm_arch_setup instead of
3861 init_registers_arm.
3862 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3863 (init_windows_x86): Rename to ...
3864 (i386_arch_setup): ... this. Set `win32_tdesc'.
3865 (the_low_target): Adjust.
3866 * win32-low.c (win32_tdesc): New global.
3867 (child_add_thread): Don't create the thread cache here.
3868 (do_initial_child_stuff): Set the new process'es tdesc.
3869 * win32-low.h (struct target_desc): Forward declare.
3870 (win32_tdesc): Declare.
3871 * lynx-i386-low.c (tdesc_i386): Declare global.
3872 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3873 * lynx-low.c (lynx_tdesc): New global.
3874 (lynx_add_process): Set the new process'es tdesc.
3875 * lynx-low.h (struct target_desc): Forward declare.
3876 (lynx_tdesc): Declare global.
3877 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3878 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3879 * nto-low.c (nto_tdesc): New global.
3880 (do_attach): Set the new process'es tdesc.
3881 * nto-low.h (struct target_desc): Forward declare.
3882 (nto_tdesc): Declare.
3883 * nto-x86-low.c (tdesc_i386): Declare.
3884 (nto_x86_arch_setup): Set `nto_tdesc'.
3885
b1fbec62
GB
38862013-06-04 Gary Benson <gbenson@redhat.com>
3887
3888 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3889 to qSupported response when appropriate.
3890 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3891 with nonzero-length annex.
3892 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3893 arguments supplied in annex.
3894
d1ec4ce7
DE
38952013-05-31 Doug Evans <dje@google.com>
3896
ac44adcb 3897 PR server/15594
d1ec4ce7
DE
3898 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3899 64 bits in 64-cross-32 environment.
3900
9b25f2d3
PA
39012013-05-28 Pedro Alves <palves@redhat.com>
3902
3903 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3904 (aarch64-without-fpu.c): Delete rule.
3905 * configure.srv (aarch64*-*-linux*): Remove references to
3906 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3907 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3908 declaration.
3909
6740dc9c
PA
39102013-05-24 Pedro Alves <palves@redhat.com>
3911
3912 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3913 instead of strchr/decode_address. Error if the range isn't split
3914 with a ','. Don't assume there's be a ':' in the action.
3915
c2d6af84
PA
39162013-05-23 Yao Qi <yao@codesourcery.com>
3917 Pedro Alves <palves@redhat.com>
3918
3919 * linux-low.c (lwp_in_step_range): New function.
3920 (linux_wait_1): If the thread was range stepping and stopped
3921 outside the stepping range, report the stop to GDB. Otherwise,
3922 continue stepping. Add range stepping debug output.
3923 (linux_set_resume_request): Copy the step range from the resume
3924 request to the lwp.
3925 (linux_supports_range_stepping): New.
3926 (linux_target_ops) <supports_range_stepping>: Set to
3927 linux_supports_range_stepping.
3928 * linux-low.h (struct linux_target_ops)
3929 <supports_range_stepping>: New field.
3930 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3931 * linux-x86-low.c (x86_supports_range_stepping): New.
3932 (the_low_target) <supports_range_stepping>: Set to
3933 x86_supports_range_stepping.
3934 * server.c (handle_v_cont): Handle 'r' action.
3935 (handle_v_requests): Append ";r" if the target supports range
3936 stepping.
3937 * target.h (struct thread_resume) <step_range_start,
3938 step_range_end>: New fields.
3939 (struct target_ops) <supports_range_stepping>:
3940 New field.
3941 (target_supports_range_stepping): New macro.
3942
58794e1a
JB
39432013-05-17 Joel Brobecker <brobecker@adacore.com>
3944
3945 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3946 confusion in comment.
3947
d631c5a7
JB
39482013-05-17 Joel Brobecker <brobecker@adacore.com>
3949
3950 * lynx-low.c (struct process_info_private): New type.
3951 (lynx_add_process): New function.
3952 (lynx_create_inferior, lynx_attach): Replace calls to
3953 add_process by calls to lynx_add_process.
3954 (lynx_resume): If PTID is null, then try using
3955 current_process()->private->last_wait_event_ptid.
3956 Add comments.
3957 (lynx_clear_inferiors): Delete. The contents of that function
3958 has been inlined in lynx_mourn;
3959 (lynx_wait_1): Save the ptid in the process's private data.
3960 (lynx_mourn): Free the process' private data. Replace call
3961 to lynx_clear_inferiors by call to clear_inferiors.
3962
96f7a20f
YQ
39632013-05-17 Yao Qi <yao@codesourcery.com>
3964
3965 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3966 the right place.
3967
db0dfaa0
LM
39682013-05-16 Luis Machado <lgustavo@codesourcery.com>
3969
3970 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3971 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3972 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3973 PT_TEXT_END_ADDR guards. Update comments.
3974 (linux_target_op) <read_offsets>: Conditionally define to
3975 linux_read_offsets if the target is UCLIBC and if it defines
3976 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3977
68f5f838
SL
39782013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3979 Andrew Jenner <andrew@codesourcery.com>
3980
3981 * Makefile.in (SFILES): Add linux-nios2-low.c.
3982 (clean): Add action to delete nios2-linux.c.
3983 (nios2-linux.c): New rule.
3984 * configure.srv: Add nios2*-*-linux*.
3985 * linux-nios2-low.c: New.
3986
1ebff1fd
HAQ
39872013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3988
3989 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3990
f6150862
HZ
39912013-04-25 Hui Zhu <hui@codesourcery.com>
3992
3993 PR gdb/15186
f6150862
HZ
3994 * ax.c (ax_printf): Add fflush.
3995
614c279d
TT
39962013-04-22 Tom Tromey <tromey@redhat.com>
3997
3998 * Makefile.in (SFILES): Add filestuff.c.
3999 (OBS): Add filestuff.o.
4000 (filestuff.o): New target.
4001 * config.in, configure: Rebuild.
4002 * configure.ac: Check for fdwalk, pipe2.
4003
7d4e5717
PA
40042013-04-17 Pedro Alves <palves@redhat.com>
4005
4006 * configure.ac (USE_THREAD_DB): Delete variable.
4007 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4008 Don't AC_SUBST USE_THREAD_DB.
4009 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4010 * config.in, configure: Regenerate.
4011
d5c93e41
PA
40122013-04-16 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.h (struct lwp_info) <thread_known>: Move under
4015 the USE_THREAD_DB #ifdef.
4016
04f5fe89
PA
40172013-04-16 Pedro Alves <palves@redhat.com>
4018
4019 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4020 (linux-low.o): Delete rule.
4021 * linux-low.h: Always include "gdb_thread_db.h" instead of
4022 conditionally including thread_db.h.
4023 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4024 HAVE_THREAD_DB_H.
4025
480b27bf
JK
40262013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4027
4028 * Makefile.in (install-only): Fix make install regression.
4029
43662968
JK
40302013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4031
4032 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4033 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4034 installation.
4035 * gdbserver.1: Remove.
4036
3e74e146
PA
40372013-03-22 Pedro Alves <palves@redhat.com>
4038
4039 * linux-low.c (handle_extended_wait): Don't call
4040 linux_enable_event_reporting.
4041
a8347a2a
TT
40422013-03-15 Tony Theodore <tonyt@logyst.com>
4043
4044 PR build/9098:
4045 * Makefile.in (SHELL): Use @SHELL@.
4046
eeb56fa7
SDJ
40472013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4048
4049 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4050 compiler warning.
4051
4fa7e2ff
JB
40522013-03-13 Joel Brobecker <brobecker@adacore.com>
4053
4054 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4055 Remove extraneous NULL element.
4056
8ddb1965
YQ
40572013-03-13 Yao Qi <yao@codesourcery.com>
4058
4059 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4060 'V' block in trace frame.
4061
9accd112
MM
40622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4063
4064 * target.h (struct target_ops): Add btrace ops.
4065 (target_supports_btrace): New macro.
4066 (target_enable_btrace): New macro.
4067 (target_disable_btrace): New macro.
4068 (target_read_btrace): New macro.
4069 * gdbthread.h (struct thread_info): Add btrace field.
4070 * server.c: Include btrace-common.h.
4071 (handle_btrace_general_set): New function.
4072 (handle_btrace_enable): New function.
4073 (handle_btrace_disable): New function.
4074 (handle_general_set): Call handle_btrace_general_set.
4075 (handle_qxfer_btrace): New function.
4076 (struct qxfer qxfer_packets[]): Add btrace entry.
4077 * inferiors.c (remove_thread): Disable btrace.
4078 * linux-low: Include linux-btrace.h.
4079 (linux_low_enable_btrace): New function.
4080 (linux_low_read_btrace): New function.
4081 (linux_target_ops): Add btrace ops.
4082 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4083 Add srv_linux_btrace=yes.
4084 (x86_64-*-linux*): Add linux-btrace.o.
4085 Add srv_linux_btrace=yes.
4086 * configure.ac: Define HAVE_LINUX_BTRACE.
4087 * config.in: Regenerated.
4088 * configure: Regenerated.
4089
5cc22e4c
MM
40902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4091
4092 * server.c (handle_qxfer): Preserve error message if -3 is
4093 returned.
4094 (qxfer): Document the -3 return value.
4095
7c97f91e
MM
40962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4097
4098 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4099 (linux_btrace_h): New variable.
4100 (linux-btrace.o): New rule.
4101
be9a119c 41022013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4103 Hafiz Abid Qadeer <abidh@codesourcery.com>
4104
4105 * tracepoint.c (trace_buffer_size): New global.
4106 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4107 (init_trace_buffer): Change to one-argument function. Allocate
4108 trace buffer memory.
4109 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4110 handle QTBuffer:size packet.
4111 (cmd_bigqtbuffer_size): New function.
4112 (initialize_tracepoint): Call init_trace_buffer with
4113 DEFAULT_TRACE_BUFFER_SIZE.
4114 * server.c (handle_query): Add QTBuffer:size in the
4115 supported packets.
4116
e64f7499
YQ
41172013-03-07 Yao Qi <yao@codesourcery.com>
4118
4119 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4120 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4121 of -1.
4122 (cmd_qtsp): Adjust condition. Do post increment.
4123 Set cur_action and cur_step_action back to 0.
4124
f0ae6fc3
PA
41252013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4126
4127 PR server/15236
4128 * linux-low.c (linux_write_memory): Return early success if LEN is
4129 zero.
4130
b5b0b0af
CV
41312013-03-05 Corinna Vinschen <vinschen@redhat.de>
4132
334ad4a8 4133 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4134
589bc927
TT
41352013-02-28 Tom Tromey <tromey@redhat.com>
4136
4137 * configure.ac: Invoke AC_SYS_LARGEFILE.
4138 * configure, config.in: Rebuild.
4139
dfe07582
CV
41402013-02-28 Corinna Vinschen <vinschen@redhat.com>
4141
4142 * win32-low.c: Throughout, fix format strings and casts of
4143 printf-like functions to avoid type related warnings on all
4144 platforms.
4145 (get_child_debug_event): Print dwDebugEventCode as hex since
4146 that's how it's usually documented.
4147
736cd585
YQ
41482013-02-28 Yao Qi <yao@codesourcery.com>
4149
4150 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4151 pulongest.
4152
e1f58301
JW
41532013-02-27 Jiong Wang <jiwang@tilera.com>
4154
4155 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4156 (reg-tilegx32.c): New rule.
4157 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4158 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4159 different register info initializer according to elf class.
4160 (init_registers_tilgx32): New function. The tilegx32 register info
4161 initializer.
4162 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4163 (tile_store_gregset): Likewise.
4164
d171ca78
YQ
41652013-02-27 Yao Qi <yao@codesourcery.com>
4166
4167 * server.c (process_point_options): Print debug message when
4168 debug_threads is true.
4169
282bbdf3
YQ
41702013-02-26 Yao Qi <yao@codesourcery.com>
4171
4172 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4173
aca22551
PA
41742013-02-19 Pedro Alves <palves@redhat.com>
4175 Kai Tietz <ktietz@redhat.com>
4176
4177 PR gdb/15161
4178
4179 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4180 instead of strtoul to extract address from packet.
4181 (process_serial_event) <'z'>: Likewise.
4182
4f3cee1c
YQ
41832013-02-18 Yao Qi <yao@codesourcery.com>
4184
4185 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4186
8e1d55a3
PA
41872013-02-14 Pedro Alves <palves@redhat.com>
4188
4189 Plug memory leak.
4190
4191 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4192 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4193
458820da
PA
41942013-02-14 Pedro Alves <palves@redhat.com>
4195
4196 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4197
baea0dae
PA
41982013-02-14 Pedro Alves <palves@redhat.com>
4199
4200 * tracepoint.c (save_string): Delete.
4201 (add_tracepoint_action): Use savestring instead of save_string.
4202
0b1afbb3
PA
42032013-02-12 Pedro Alves <palves@redhat.com>
4204
4205 * linux-xtensa-low.c: Ditto.
4206 * xtensa-xtregs.c: Ditto.
4207
8a4ac37e
PA
42082013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4209
4210 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4211 thread_db.
4212
148de6bb
MS
42132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4214
4215 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4216 aarch64_num_wp_regs and aarch64_num_bp_regs to
4217 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4218
55fac6e0
MS
42192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4220
4221 * linux-aarch64-low.c (ps_get_thread_area): Replace
4222 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4223
176eb98c
MS
42242013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4225 Marcus Shawcroft <marcus.shawcroft@arm.com>
4226 Nigel Stephens <nigel.stephens@arm.com>
4227 Yufeng Zhang <yufeng.zhang@arm.com>
4228
4229 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4230 (aarch64.c, aarch64-without-fpu.c): New targets.
4231 * configure.srv (aarch64*-*-linux*): New.
4232 * linux-aarch64-low.c: New file.
4233
56f7af9c
MS
42342013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4235
43aaf8b6 4236 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4237 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4238 (dequeue_one_deferred_signal, linux_resume_one_thread)
4239 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4240 (linux_tracefork_grandchild, linux_test_for_tracefork)
4241 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4242 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4243 where the argument is 0.
4244
60f662b0
YQ
42452013-01-25 Yao Qi <yao@codesourcery.com>
4246
4247 * event-loop.c: Include "queue.h".
4248 (gdb_event_p): New typedef.
4249 (struct gdb_event) <next_event>: Remove.
4250 (event_queue): Change to QUEUE(gdb_event_p).
4251 (async_queue_event): Remove.
4252 (gdb_event_xfree): New.
4253 (initialize_event_loop): New.
4254 (process_event): Use API from QUEUE.
4255 (wait_for_event): Likewise.
4256 * server.c (main): Call initialize_event_loop.
4257 * server.h (initialize_event_loop): Declare.
4258
5ae4861a
YQ
42592013-01-18 Yao Qi <yao@codesourcery.com>
4260
4261 * ax.h (struct eval_agent_expr_context): New.
4262 (gdb_eval_agent_expr): Update declaration.
4263 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4264 TFRAME. Add new argument CTX.
4265 * server.h (struct eval_agent_expr_context): Declare.
4266 (agent_mem_read, agent_tsv_read): Update declaration.
4267 (agent_mem_read_string): Likewise.
4268 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4269 (add_traceframe_block): Add new argument TPOINT.
4270 Increase TPOINT->traceframe_usage.
4271 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4272 eval_tracepoint_agent_expr.
4273 (condition_true_at_tracepoint): Likewise.
4274 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4275 (agent_mem_read_string, agent_tsv_read): Likewise.
4276
85e00e85
YQ
42772013-01-16 Yao Qi <yao@codesourcery.com>
4278
4279 * linux-low.c (linux_resume_one_lwp): Don't check
4280 'lwp->bp_reinsert != 0'.
4281
4039cf45
JB
42822013-01-07 Joel Brobecker <brobecker@adacore.com>
4283 Pedro Alves <palves@redhat.com>
4284
4285 * lynx-low.c (ptrace_request_to_str): Define a temporary
4286 macro and use it to simplify this function's implementation.
4287
9044dee2
JB
42882013-01-07 Joel Brobecker <brobecker@adacore.com>
4289
4290 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4291 sets errno.
4292
e6352c8f
JB
42932013-01-07 Joel Brobecker <brobecker@adacore.com>
4294
4295 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4296
50681a27
JB
42972013-01-07 Joel Brobecker <brobecker@adacore.com>
4298
4299 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4300
3f6e77ef
JB
43012013-01-07 Joel Brobecker <brobecker@adacore.com>
4302
4303 * lynx-low.c (lynx_resume): Use the resume_info parameter
4304 to determine the ptid for the lynx_ptrace call, unless
4305 it is equal to minus_one_ptid, in which case we use the
4306 ptid of the current_inferior.
4307 (lynx_wait_1): After having received a thread create/exit
4308 event, resume the inferior's execution using the signaling
4309 thread's ptid, rather than the old ptid.
4310
7fda33ae
JB
43112013-01-07 Joel Brobecker <brobecker@adacore.com>
4312
4313 * lynx-low.c (lynx_resume): Delete variable ret.
4314
b9786c74
JB
43152013-01-01 Joel Brobecker <brobecker@adacore.com>
4316
4317 * gdbreplay.c (gdbreplay_version): Update copyright year.
4318 * server.c (gdbserver_version): Likewise.
4319
8b93d60f
JB
43202012-12-17 Joel Brobecker <brobecker@adacore.com>
4321
4322 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4323 new thread.
4324
037335a7
JB
43252012-12-17 Joel Brobecker <brobecker@adacore.com>
4326
4327 * lynx-low.c (ptrace_request_to_str): Add handling for
4328 PTRACE_GETTRACESIG.
4329
52d4cbd8
JB
43302012-12-17 Joel Brobecker <brobecker@adacore.com>
4331
4332 * lynx-low.c (lynx_attach): Delete variable new_process.
4333
ab8f6ca9
JB
43342012-12-17 Joel Brobecker <brobecker@adacore.com>
4335
4336 * lynx-low.c (lynx_create_inferior): Delete variable
4337 new_process.
4338
78cbc024
JB
43392012-12-17 Joel Brobecker <brobecker@adacore.com>
4340
4341 * lynx-low.c (ptrace_request_to_str): Do not handle
4342 PTRACE_GETTHREADLIST if this macro does not exist.
4343
14a00470
YQ
43442012-12-15 Yao Qi <yao@codesourcery.com>
4345
4346 * Makefile.in (OBS): Add notif.o.
4347 * notif.c, notif.h: New.
4348 * server.c: Include "notif.h".
4349 (struct vstop_notif) <next>: Remove.
4350 <base>: New field.
4351 (queue_stop_reply): Update.
4352 (push_event, send_next_stop_reply): Remove.
4353 (discard_queued_stop_replies): Update.
4354 (notif_stop): New variable.
4355 (handle_v_stopped): Remove.
4356 (handle_v_requests): Don't call handle_v_stopped. Call
4357 handle_ack_notif instead.
4358 (queue_stop_reply_callback): Call notif_event_enque instead
4359 of queue_stop_reply.
4360 (handle_status): Don't call send_next_stop_reply, call
4361 notif_write_event instead.
4362 (kill_inferior_callback): Likewise.
4363 (detach_or_kill_inferior_callback): Likewise.
4364 (main): Call initialize_notif.
4365 (process_serial_event): Call QUEUE_is_empty.
4366 (handle_target_event): Call notif_push instead of push event.
4367 * server.h (push_event): Remove declaration.
4368
61c125b9
TT
43692012-12-10 Tom Tromey <tromey@redhat.com>
4370
4371 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4372 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4373 macros.
4374 (.c.o): Rewrite.
4375 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4376 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4377 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4378 (amd64-linux-ipa.o, ax.o): Rewrite.
4379 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4380 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4381 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4382 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4383 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4384 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4385 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4386 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4387 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4388 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4389 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4390 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4391 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4392 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4393 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4394 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4395 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4396 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4397 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4398 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4399 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4400 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4401 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4402 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4403 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4404 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4405 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4406 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4407 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4408 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4409 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4410 (reg-tilegx.o): Remove.
4411 (all_object_files): New macro.
4412 Include .deps files.
4413 * aclocal.m4, configure: Rebuild.
4414 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4415 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4416 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4417
e90e9ad9
TT
44182012-12-05 Tom Tromey <tromey@redhat.com>
4419
4420 PR gdb/14917:
4421 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4422
02d403bf 44232012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4424
4425 * configure.ac: Check for linux/perf_event.h.
4426 * config.in: Regenerated.
4427 * configure: Regenerated.
4428
0270a750
PA
44292012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4430
4431 * hostio.c (handle_readlink): Decrease buffer size
4432 parameter passed to readlink by one byte.
4433
8c29b58e
YQ
44342012-11-26 Yao Qi <yao@codesourcery.com>
4435
4436 * configure.ac (build_warnings): Append '-Wempty-body'.
4437 * configure: Regenerated.
4438 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4439 body.
4440
8bdce1ff
PM
44412012-11-15 Pierre Muller <muller@sourceware.org>
4442
4443 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4444 * config.in: Regenerate.
4445 * configure: Regenerate.
4446 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4447 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4448 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4449 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4450 header.
4451 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4452 instead of <sys/wait.h> header.
4453 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4454
02d403bf 44552012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4456
4457 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4458 (various make rules): Remove -DGDBSERVER
4459
fbd5db48
YQ
44602012-11-09 Yao Qi <yao@codesourcery.com>
4461
4462 * spu-low.c (current_ptid): Move it to ..
4463 * gdbthread.h: ... here. New.
4464 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4465 * server.c (myresume, process_serial_event): Likewise.
4466 * thread-db.c (thread_db_find_new_threads): Likewise.
4467 * tracepoint.c (run_inferior_command): Likewise.
4468
b3dc46ff
AB
44692012-10-01 Andrew Burgess <aburgess@broadcom.com>
4470
4471 * server.c (handle_search_memory_1): Include access length in
4472 warning message.
4473
07c04788
HPN
44742012-09-05 Michael Brandt <michael.brandt@axis.com>
4475
4476 * linux-crisv32-low.c: Fix compile errors.
4477
918d227b
YQ
44782012-09-04 Yao Qi <yao@codesourcery.com>
4479
4480 * tracepoint.c (cmd_qtsv): Adjust debug message.
4481 Don't check CUR_TPOINT.
4482
18c1b81a
YQ
44832012-08-28 Yao Qi <yao@codesourcery.com>
4484
4485 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4486 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4487 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4488 Remove declarations of xmalloc, xreallloc, xstrdup and
4489 freeargv.
4490 * Makefile.in (libiberty_h): New.
4491 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4492 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4493
dc82f37b
YQ
44942012-08-23 Yao Qi <yao@codesourcery.com>
4495
4496 * server.h: Remove declaration of 'xsnprintf'.
4497
406b1477
KS
44982012-08-22 Keith Seitz <keiths@redhat.com>
4499
4500 * server.h: Include build-gnulib-gbserver/config.h.
4501 * gdbreplay.c: Likewise.
4502
e6712ff1
DE
45032012-08-08 Doug Evans <dje@google.com>
4504
4505 * Makefile.in (SFILES): Add gdb_vecs.c.
4506 (OBS): Add gdb_vecs.o.
4507 (gdb_vecs_h, host_defs_h): New variables.
4508 (thread-db.o): Add $(gdb_vecs_h) dependency.
4509 (gdb_vecs.o): New rule.
4510 * thread-db.c: #include "gdb_vecs.h".
4511 (thread_db_load_search): Use a vector to iterate over path elements.
4512 Handle text appearing after "$pdir".
4513
4514 * configure.ac: Add check for strstr.
4515 * config.in: Regenerate.
4516 * configure: Regenerate.
4517
7c3270ae
UW
45182012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4519
4520 * hostio.c (handle_pread): If pread fails, fall back to attempting
4521 lseek/read.
4522 (handle_pwrite): Likewise for pwrite.
4523
b62e2b27
UW
45242012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4525
4526 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4527 between unsupported TYPE and unimplementable ADDR/LEN combination.
4528 (arm_insert_point): Act on new return value.
4529
78a99e91
PA
45302012-07-31 Pedro Alves <palves@redhat.com>
4531
4532 * server.c (process_point_options): Only skip tokens if we find
4533 one that is unrecognized. Don't treat 'X' specially while
4534 skipping unrecognized tokens.
4535
fcf303ab
UW
45362012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4537
4538 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4539 to 4-byte-align HW breakpoint addresses for Thumb.
4540
7255706c
YQ
45412012-07-27 Yao Qi <yao@codesourcery.com>
4542
4543 PR remote/14161.
4544
4545 * server.h: Declare gdb_agent_about_to_close.
4546 * target.c (kill_inferior): Include "agent.h".
4547 New. Send command 'kill'.
4548 * target.h (kill_inferior): Removed macro.
4549 * tracepoint.c (gdb_agent_about_to_close): New.
4550 (gdb_agent_helper_thread): Handle command 'close'.
4551 Wait endlessly until the inferior stops.
4552 Install gdb_agent_remove_socket to atexit hook.
4553 (agent_socket_name): New static variable.
4554 (gdb_agent_socket_init): Replace local variable 'name' with
4555 'agent_socket_name'.
4556 (gdb_agent_remove_socket): New.
4557
5a3f286f
YQ
45582012-07-27 Yao Qi <yao@codesourcery.com>
4559
4560 * server.c (process_point_options): Stop at 'X' when parsing.
4561
961bd387
ME
45622012-07-19 Michael Eager <eager@eagercon.com>
4563
a261b8f5 4564 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4565 to hw_execute.
4566 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4567 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4568 hardware breakpoint.
4569
aa7c7447
JK
45702012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4571
4572 * gdbserver/linux-low.c (initialize_low): Call
4573 linux_ptrace_init_warnings.
4574
7f216e7c
DE
45752012-07-02 Doug Evans <dje@google.com>
4576
4577 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4578 pointer to int.
4579
d3ce09f5
SS
45802012-07-02 Stan Shebs <stan@codesourcery.com>
4581
4582 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4583 (ax.o): Add it to build rule.
4584 (ax-ipa.o): Ditto.
4585 (OBS): Add format.o.
4586 (IPA_OBS): Add format.o.
4587 * server.c (handle_query): Claim support for breakpoint commands.
4588 (process_point_options): Add command case.
4589 (process_serial_event): Leave running if there are printfs in
4590 effect.
4591 * mem-break.h (any_persistent_commands): Declare.
4592 (add_breakpoint_commands): Declare.
4593 (gdb_no_commands_at_breakpoint): Declare.
4594 (run_breakpoint_commands): Declare.
4595 * mem-break.c (struct point_command_list): New struct.
4596 (struct breakpoint): New field command_list.
4597 (any_persistent_commands): New function.
4598 (add_commands_to_breakpoint): New function.
4599 (add_breakpoint_commands): New function.
4600 (gdb_no_commands_at_breakpoint): New function.
4601 (run_breakpoint_commands): New function.
4602 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4603 locally.
4604 * ax.c: Include format.h.
4605 (ax_printf): New function.
4606 (gdb_eval_agent_expr): Add printf opcode.
4607
2f8f6aed
YQ
46082012-06-13 Yao Qi <yao@codesourcery.com>
4609
4610 * server.c (start_inferior): Remove duplicated writes to fields
4611 'last_resume_kind' and 'last_status' of 'current_inferior'.
4612
0c9070b3
YQ
46132012-06-12 Yao Qi <yao@codesourcery.com>
4614 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4617 comment.
4618 * server.c (handle_v_cont): Extend comment.
4619
c52daf70
YQ
46202012-06-11 Yao Qi <yao@codesourcery.com>
4621
4622 * linux-low.c (linux_attach): Add 'static'.
4623
d38bbb0a
YQ
46242012-06-06 Yao Qi <yao@codesourcery.com>
4625
4626 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4627
89dc0afd
JK
46282012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4629
4630 Fix gcc -flto compilation warning.
4631 * server.c (main): Make variable multi_mode and attach volatile.
4632
75f62ce7
TJB
46332012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4634
4635 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4636 if the platform doesn't know about it.
4637
65f479b6
PA
46382012-05-30 Jeff Kenton <jkenton@tilera.com>
4639
4640 * Makefile.in (SFILES): Add linux-tile-low.c.
4641 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4642 * configure.srv: Handle tilegx-*-linux*.
4643 * linux-tile-low.c: New file.
4644
0c5bf5a9
JK
46452012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4646
4647 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4648
a493e3e2
PA
46492012-05-24 Pedro Alves <palves@redhat.com>
4650
4651 PR gdb/7205
4652
43aaf8b6 4653 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4654
2ea28649
PA
46552012-05-24 Pedro Alves <palves@redhat.com>
4656
4657 PR gdb/7205
4658
4659 Replace target_signal with gdb_signal throughout.
4660
8d409d16
MR
46612012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4662
4663 * linux-low.c (linux_store_registers): Avoid the copying sequence
4664 when no data has been retrieved by ptrace.
4665
23512c01
MGD
46662012-05-22 Will Deacon <will.deacon@arm.com>
4667
4668 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4669 Include asm/ptrace.h.
4670 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4671 already defined.
4672
4934b29e
MR
46732012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4674
4675 * linux-low.c (linux_store_registers): Don't re-retrieve data
4676 with ptrace that has already been obtained from /proc. Always
4677 copy any data retrieved with ptrace to the buffer supplied.
4678
bde24c0a
PA
46792012-05-11 Yao Qi <yao@codesourcery.com>
4680 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (enum stopping_threads_kind): New.
4683 (stopping_threads): Change type to `enum stopping_threads_kind'.
4684 (handle_extended_wait): If stopping and suspending threads, leave
4685 the new_lwp suspended too.
4686 (linux_wait_for_event): Adjust.
4687 (stop_all_lwps): Set `stopping_threads' to
4688 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4689 whether we're suspending threads or just stopping them. Assert no
4690 recursion happens.
4691
623b6bdf
YQ
46922012-04-29 Yao Qi <yao@codesourcery.com>
4693
4694 * server.h: Move some code to ...
4695 * gdbthread.h: ... here. New.
4696 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4697 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4698 (nto-low.o, win32-low.o): Likewise.
4699 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4700 * regcache.c, remote-utils.c, server.c: Likewise.
4701 * target.c, tracepoint.c, win32-low.c: Likewise.
4702
f15f9948
TJB
47032012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4704
4705 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4706 (PTRACE_ARG4_TYPE): Likewise.
4707 (PTRACE_XFER_TYPE): Likewise.
4708 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4709 ptrace to PTRACE_ARG3_TYPE.
4710 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4711 (PTRACE_ARG4_TYPE): Likewise.
4712 (PTRACE_XFER_TYPE): Likewise.
4713 (linux_detach_one_lwp): Cast fourth argument of
4714 ptrace to long then PTRACE_ARG4_TYPE.
4715 (regsets_fetch_inferior_registers): Cast third argument of
4716 ptrace to long then PTRACE_ARG3_TYPE.
4717 (regsets_store_inferior_registers): Likewise.
4718
38ea300a
PA
47192012-04-20 Pedro Alves <palves@redhat.com>
4720
4721 * configure: Regenerate.
4722
c971b7fa
PA
47232012-04-19 Pedro Alves <palves@redhat.com>
4724
43aaf8b6 4725 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4726 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4727 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4728 (all, install-only, uninstall, clean-info, all-lib, clean): No
4729 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4730 (maintainer-clean realclean distclean): Use subdir_do.
4731 (subdir_do): New.
4732 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4733 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4734 * acinclude.m4: Include acx_configure_dir.m4.
4735 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4736 calls. Call AC_PROG_RANLIB. Configure gnulib using
4737 ACX_CONFIGURE_DIR.
4738 (GNULIB): New.
4739 (GNULIB_STDINT_H): Adjust.
4740 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4741 * gdbreplay.c: Include build-gnulib/config.h.
4742 * server.h: Likewise.
4743 * aclocal.m4: Regenerate.
4744 * config.in: Regenerate.
4745 * configure: Regenerate.
c971b7fa 4746
809277f8
PA
47472012-04-19 Pedro Alves <palves@redhat.com>
4748
4749 * Makefile.in (LIBGNU, INCGNU): Adjust.
4750 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4751 (all, install-only, uninstall, clean-info, all-lib, clean)
4752 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4753 * configure.ac: Adjust AC_OUTPUT output.
4754 * aclocal.m4: Regenerate.
4755 * configure: Regenerate.
4756
fd9bb8b8
PA
47572012-04-19 Pedro Alves <palves@redhat.com>
4758
4759 * Makefile.in (generated_files): New.
4760 (server_h): Remove the explicit dependency on config.h, and depend
4761 on $generated_files.
4762
1c298c66
PA
47632012-04-19 Pedro Alves <palves@redhat.com>
4764
4765 * Makefile.in (INCGNU): Add -Ignulib.
4766
57c4b50b
PA
47672012-04-19 Pedro Alves <palves@redhat.com>
4768
4769 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4770 (INCGNU): ... this, and spell out -I here.
4771 (GNULIB_LIB): Rename to ...
4772 (LIBGNU): ... this.
4773 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4774
1030e047
PA
47752012-04-19 Pedro Alves <palves@redhat.com>
4776
4777 * config.in: Regenerate.
4778
447d4319
PA
47792012-04-19 Pedro Alves <palves@redhat.com>
4780
4781 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4782 * server.h (memmem): Remove declaration.
4783 * config.in: Regenerate.
4784 * configure: Regenerate.
4785
aad9eab9
YQ
47862012-04-19 Yao Qi <yao@codesourcery.com>
4787
4788 * Makefile.in (SFILES): Add common/vec.c.
4789 (OBS): Add vec.o.
4790 (vec.o): New rule.
4791
3e10640f
YQ
47922012-04-19 Yao Qi <yao@codesourcery.com>
4793
4794 * remote-utils.c (prepare_resume_reply): Replace with macro
4795 target_core_of_thread.
4796 * server.c (handle_qxfer_threads_proper): Likewise.
4797 * target.h (traget_core_of_thread): New macro.
4798
71622373
PA
47992012-04-18 Pedro Alves <palves@redhat.com>
4800
4801 * aclocal.m4: Regenerate.
4802 * configure: Regenerate.
4803
80d26939
YQ
48042012-04-16 Yao Qi <yao@codesourcery.com>
4805
4806 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4807 duplicated on address.
4808
42476b70
YQ
48092012-04-16 Yao Qi <yao@codesourcery.com>
4810
4811 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4812 (struct tracepoint_action_ops) <send>: New field.
4813 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4814 (agent_expr_send, x_tracepoint_action_send): New.
4815 (l_tracepoint_action_send): New.
4816 (cmd_qtdp): Download and install tracepoint
4817 according to `use_agent'.
4818 (run_inferior_command): Add one more parameter `len'.
4819 Update callers.
4820 (tracepoint_send_agent): New.
4821 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4822
7bc83639
YQ
48232012-04-16 Yao Qi <yao@codesourcery.com>
4824
4825 * tracepoint.c (download_tracepoints): Moved to ...
4826 (cmd_qtstart): ... here.
4827
5f18041e
YQ
48282012-04-14 Yao Qi <yao@codesourcery.com>
4829
4830 * tracepoint.c: Include inttypes.h.
4831 (struct collect_memory_action): Use sized types.
4832 (struct tracepoint): Likewise.
4833 (cmd_qtdp, stop_tracing): Update print specifiers.
4834 (cmd_qtp, response_tracepoint): Likewise.
4835 (collect_data_at_tracepoint): Likewise.
4836 (collect_data_at_step): Likewise.
4837
55a8c076
YQ
48382012-04-14 Yao Qi <yao@codesourcery.com>
4839
4840 Import gnulib module inttypes.
4841 * aclocal.m4, config.in, configure: Regenerated.
4842
dc750257
YQ
48432012-04-14 Yao Qi <yao@codesourcery.com>
4844
4845 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4846 Makefile and config.status at last.
4847
0ab5faf9
YQ
48482012-04-13 Yao Qi <yao@codesourcery.com>
4849
4850 * tracepoint.c: Include stdint.h unconditionally.
4851
18f5fd81
TJB
48522012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4853
4854 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4855 on BFD_HAVE_SYS_PROCFS_TYPE.
4856 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4857 * configure: Regenerate.
4858 * config.in: Likewise.
4859
4d47af5c
L
48602012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4861
4862 * Makefile.in (clean): Also remove x32.c x32-linux.c
4863 x32-avx.c x32-avx-linux.c.
4864 (x32.o): New target.
4865 (x32.c): Likewise.
4866 (x32-linux.o): Likewise.
4867 (x32-linux.c): Likewise.
4868 (x32-avx.o): Likewise.
4869 (x32-avx.c): Likewise.
4870 (x32-avx-linux.o): Likewise.
4871 (x32-avx-linux.c): Likewise.
4872
4873 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4874 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4875 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4876 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4877 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4878 i386/x32-avx-linux.xml.
4879
4880 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4881 (init_registers_x32_avx_linux): Likwise.
4882 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4883 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4884
ecedbe58
PA
48852012-04-13 Pedro Alves <palves@redhat.com>
4886
4887 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4888 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4889 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4890 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4891 the sub-make.
4892
c92b5177
L
48932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4894
4895 * linux-x86-low.c (compat_x32_clock_t): New.
4896 (compat_x32_siginfo_t): Likewise.
4897 (compat_x32_siginfo_from_siginfo): Likewise.
4898 (siginfo_from_compat_x32_siginfo): Likewise.
4899 (linux_is_elf64): Likewise.
4900 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4901 and siginfo_from_compat_x32_siginfo for x32.
4902 (x86_arch_setup): Set linux_is_elf64.
4903
214d508e
L
49042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4905
4906 PR gdb/13969
4907 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4908 e_machine field.
4909 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4910 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4911 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4912 compatible with process.
4913
c9a1864a
YQ
49142012-04-12 Yao Qi <yao@codesourcery.com>
4915
4916 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4917 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4918 (install-only, install-info, clean): Handle sub dir gnulib.
4919 (all-lib, am--refresh): New targets.
4920 (memmem.o): Remove target.
4921 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4922 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4923 (AC_REPLACE_FUNCS): Remove memmem.
4924 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4925 (AC_OUTPUT): Generate Makefile in gnulib/.
4926 * aclocal.m4, config.in, configure: Regenerated.
4927
367ba2c2
MR
49282012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4929
4930 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4931
9d236627
PA
49322012-04-05 Pedro Alves <palves@redhat.com>
4933
4934 -Werror=strict-aliasing
4935
4936 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4937 pointer.
4938
111217b3
PA
49392012-04-04 Pedro Alves <palves@redhat.com>
4940
4941 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4942 (sparc_store_gregset_from_stack, sparc_store_gregset)
4943 (sparc_breakpoint_at): Fix formatting.
4944
8365dcf5
TJB
49452012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4946
4947 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4948 are available.
4949 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4950 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4951 * config.in: Regenerate.
4952 * configure: Likewise.
4953
689cc2ae
PA
49542012-03-29 Pedro Alves <palves@redhat.com>
4955
4956 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4957 Correct ptrace arguments.
4958
c14dfd32
PA
49592012-03-28 Pedro Alves <palves@redhat.com>
4960
4961 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4962 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4963 (IA64_FR1_REGNUM): New defines.
4964 (ia64_fetch_register): New.
4965 (the_low_target): Install it.
4966 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4967 field.
4968 * linux-low.c (linux_fetch_registers): Try the
4969 the_low_target.fetch_register hook first.
4970
4971 * linux-arm-low.c (the_low_target): Adjust.
4972 * linux-bfin-low.c (the_low_target): Adjust.
4973 * linux-cris-low.c (the_low_target): Adjust.
4974 * linux-crisv32-low.c (the_low_target): Adjust.
4975 * linux-m32r-low.c (the_low_target): Adjust.
4976 * linux-m68k-low.c (the_low_target): Adjust.
4977 * linux-mips-low.c (the_low_target): Adjust.
4978 * linux-ppc-low.c (the_low_target): Adjust.
4979 * linux-s390-low.c (the_low_target): Adjust.
4980 * linux-sh-low.c (the_low_target): Adjust.
4981 * linux-sparc-low.c (the_low_target): Adjust.
4982 * linux-tic6x-low.c (the_low_target): Adjust.
4983 * linux-x86-low.c (the_low_target): Adjust.
4984 * linux-xtensa-low.c (the_low_target): Adjust.
4985
63c88e13
PA
49862012-03-26 Pedro Alves <palves@redhat.com>
4987
4988 * server.c (handle_qxfer_libraries): Don't bail early if
4989 the_target->qxfer_libraries_svr4 is not NULL.
4990
fb723180
PA
49912012-03-26 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4994
0afae3cf
PA
49952012-03-23 Pedro Alves <palves@redhat.com>
4996
4997 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4998 "library-list-svr4" element's start tag when the the DSO list is
4999 empty.
5000
485f1ee4
PA
50012012-03-23 Pedro Alves <palves@redhat.com>
5002
5003 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5004 a variable whose type size is the same as the inferior's pointer
5005 size.
5006
a5362b9a
TS
50072012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5008
5009 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5010 struct siginfo.
5011 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5012 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5013 * linux-low.h: Include <signal.h>.
5014 (struct siginfo): Remove forward declaration.
5015 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5016 struct siginfo.
5017
d226c142
MF
50182012-03-21 Mike Frysinger <vapier@gentoo.org>
5019
5020 * .gitignore: Ignore more files.
5021
122f36ef
PA
50222012-03-19 Pedro Alves <palves@redhat.com>
5023 Jan Kratochvil <jan.kratochvil@redhat.com>
5024
5025 * server.c (cont_thread, general_thread): Add describing comments.
5026 (start_inferior): Clear `cont_thread'.
5027 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5028 of a process.
5029
fc3e5175
YQ
50302012-03-15 Yao Qi <yao@codesourcery.com>
5031
5032 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5033 handling to ...
5034 (cmd_qtdp): ... here.
5035
8d0d92cd
YQ
50362012-03-15 Yao Qi <yao@codesourcery.com>
5037
5038 * tracepoint.c (struct tracepoint_action_ops): New.
5039 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5040 (m_tracepoint_action_download): New.
5041 (r_tracepoint_action_download): New.
5042 (x_tracepoint_action_download): New.
5043 (l_tracepoint_action_download): New.
5044 (add_tracepoint_action): Install `action->ops' according type.
5045 (download_tracepoint_1): Move code `download' function pointer
5046 of various tracepoint_action_ops.
5047
87b0bb13
JK
50482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5049
5050 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5051 linux_ptrace_attach_warnings.
5052
5f572dec
JK
50532012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5054
5055 * Makefile.in (linux-ptrace.o): New.
5056 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5057 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5058 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5059 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5060 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5061 of these targets.
5062 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5063
f4647387
YQ
50642012-03-08 Yao Qi <yao@codesourcery.com>
5065 Pedro Alves <palves@redhat.com>
5066
5067 Fix PR server/13392.
5068 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5069 offset of JMP insn.
5070 * tracepoint.c (remove_tracepoint): New.
5071 (cmd_qtdp): Call remove_tracepoint when failed to install.
5072
9b224c5e
PA
50732012-03-07 Pedro Alves <palves@redhat.com>
5074
5075 * linux-low.c (get_detach_signal): New.
5076 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5077 Pass on pending signals to PTRACE_DETACH. Check the result of the
5078 ptrace call.
5079 * server.c (program_signals, program_signals_p): New.
5080 (handle_general_set): Handle QProgramSignals.
5081 * server.h (program_signals, program_signals_p): Declare.
5082
e237a7e2
JK
50832012-03-05 Pedro Alves <palves@redhat.com>
5084 Jan Kratochvil <jan.kratochvil@redhat.com>
5085
5086 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5087 New comment why.
5088
5808517f
YQ
50892012-03-03 Yao Qi <yao@codesourcery.com>
5090
5091 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5092 agent_look_up_symbols.
5093
58b4daa5
YQ
50942012-03-03 Yao Qi <yao@codesourcery.com>
5095
5096 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5097 (linux-x86-low.o): Likewise.
5098 * server.h: Remove in_process_agent_loaded.
5099 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5100 common/agent.c.
5101 Update callers.
5102
8ffcbaaf
YQ
51032012-03-03 Yao Qi <yao@codesourcery.com>
5104
5105 * tracepoint.c (gdb_agent_capability): New global.
5106 (in_process_agent_loaded_ust): Renamed to
5107 `in_process_agent_supports_ust'.
5108 Update callers.
5109 (in_process_agent_supports_ust): Call agent_capability_check.
5110 (clear_installed_tracepoints): Assert that agent supports
5111 agent.
5112
d1feda86
YQ
51132012-03-03 Yao Qi <yao@codesourcery.com>
5114
5115 * linux-low.c (linux_supports_agent): New.
5116 (linux_target_ops): Initialize field `supports_agent' with
5117 linux_supports_agent.
5118 * target.h (struct target_ops) <supports_agent>: New.
5119 (target_supports_agent): New macro.
5120 * server.c (handle_general_set): Handle packet 'QAgent'.
5121 (handle_query): Send `QAgent+'.
5122 * Makefile.in (server.o): Depends on agent.h.
5123
2fa291ac
YQ
51242012-03-03 Yao Qi <yao@codesourcery.com>
5125
5126 * Makefile.in (OBS): Add agent.o.
5127 Add new rule for agent.o.
5128 Track dependence of tracepoint.c on agent.h.
5129 * tracepoint.c (run_inferior_command_1):
5130 (run_inferior_command): Call agent_run_command.
5131 (gdb_ust_connect_sync_socket): Deleted. Move it to
5132 common/agent.c.
5133 (resume_thread, stop_thread): Likewise.
5134 (gdb_ust_socket_init): Renamed to ...
5135 (gdb_agent_socket_init): ... New.
5136 (gdb_ust_thread): Renamed to ...
5137 (gdb_agent_helper_thread): ... New.
5138 (gdb_ust_init): Move some code to ...
5139 (gdb_agent_init): ... here. New.
5140 [HAVE_UST]: Call gdb_ust_init.
5141 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5142 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5143 * config.in, configure: Regenerated.
5144
05044653
PA
51452012-03-02 Pedro Alves <palves@redhat.com>
5146
5147 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5148 * linux-low.c (struct simple_pid_list): New.
5149 (stopped_pids): New a struct simple_pid_list pointer.
5150 (add_to_pid_list, pull_pid_from_list): New.
5151 (handle_extended_wait): Don't assume the first signal new children
5152 report is SIGSTOP. Adjust call to pull_pid_from_list.
5153 (linux_wait_for_lwp): Adjust.
5154
8d00225b
YQ
51552012-03-02 Yao Qi <yao@codesourcery.com>
5156
5157 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5158 debug log.
5159
19560ba5
YQ
51602012-03-02 Yao Qi <yao@codesourcery.com>
5161
5162 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5163 `stop_pc' and `tpoint'. Update caller.
5164
1faeff08
MR
51652012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5166
5167 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5168 * linux-low.c (use_linux_regsets): New macro.
5169 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5170 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5171 (linux_register_in_regsets): New function.
5172 (usr_fetch_inferior_registers): Skip registers covered by
5173 regsets.
5174 (usr_store_inferior_registers): Likewise.
5175 (usr_fetch_inferior_registers): New macro.
5176 (usr_store_inferior_registers): Likewise.
5177 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5178 (linux_store_registers): Likewise.
5179 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5180 prototype.
5181 (init_registers_mips64_dsp_linux): Likewise.
5182 (init_registers_mips_linux): New macro.
5183 (init_registers_mips_dsp_linux): Likewise.
5184 (mips_dsp_num_regs): Likewise.
5185 (DSP_BASE, DSP_CONTROL): New fallback macros.
5186 (mips_base_regs): New macro.
5187 (mips_regmap): Use it. Fix the size.
5188 (mips_dsp_regmap): New variable.
5189 (mips_dsp_regset_bitmap): Likewise.
5190 (mips_arch_setup): New function.
5191 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5192 than mips_regmap.
5193 (mips_cannot_store_register): Likewise.
5194 (the_low_target): Update .arch_setup, .num_regs and .regmap
5195 initializers. Add .regset_bitmap initializer.
5196 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5197 initializer.
5198 * linux-bfin-low.c (the_low_target): Likewise.
5199 * linux-cris-low.c (the_low_target): Likewise.
5200 * linux-crisv32-low.c (the_low_target): Likewise.
5201 * linux-ia64-low.c (the_low_target): Likewise.
5202 * linux-m32r-low.c (the_low_target): Likewise.
5203 * linux-m68k-low.c (the_low_target): Likewise.
5204 * linux-ppc-low.c (the_low_target): Likewise.
5205 * linux-s390-low.c (the_low_target): Likewise.
5206 * linux-sh-low.c (the_low_target): Likewise.
5207 * linux-sparc-low.c (the_low_target): Likewise.
5208 * linux-tic6x-low.c (the_low_target): Likewise.
5209 * linux-x86-low.c (the_low_target): Likewise.
5210 * linux-xtensa-low.c (the_low_target): Likewise.
5211 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5212 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5213 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5214 srv_xmlfiles.
5215 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5216 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5217
c03e6ccc
YQ
52182012-02-29 Yao Qi <yao@codesourcery.com>
5219 Pedro Alves <palves@redhat.com>
5220
5221 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5222 `step_over_finished' is true.
5223
644cebc9
PA
52242012-02-27 Pedro Alves <palves@redhat.com>
5225
5226 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5227 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5228
c14d7ab2
PA
52292012-02-27 Pedro Alves <palves@redhat.com>
5230
5231 PR server/9684
5232 * linux-low.c (pid_is_stopped): New.
5233 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5234
412c89dd
LM
52352012-02-25 Luis Machado <lgustavo@codesourcery.com>
5236
5237 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5238 of conditions.
5239
b745defe
MR
52402012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5241
5242 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5243
9f3a5c85
LM
52442012-02-24 Luis Machado <lgustavo@codesourcery>
5245
5246 * server.c (handle_query): Advertise support for target-side
5247 breakpoint condition evaluation.
5248 (process_point_options): New function.
5249 (process_serial_event): When inserting a breakpoint, check for
5250 a target-side condition that should be evaluated.
5251
5252 * mem-break.c: Include regcache.h and ax.h.
5253 (point_cond_list_t): New data structure.
5254 (breakpoint) <cond_list>: New field.
5255 (find_gdb_breakpoint_at): Make non-static.
5256 (delete_gdb_breakpoint_at): Clear any target-side
5257 conditions.
5258 (clear_gdb_breakpoint_conditions): New function.
5259 (add_condition_to_breakpoint): Likewise.
5260 (add_breakpoint_condition): Likewise.
5261 (gdb_condition_true_at_breakpoint): Likewise.
5262 (gdb_breakpoint_here): Return result directly instead
5263 of going through a local variable.
5264
5265 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5266 (clear_gdb_breakpoint_conditions): Likewise.
5267 (add_breakpoint_condition): Likewise.
5268 (gdb_condition_true_at_breakpoint): Likewise.
5269
5270 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5271 (need_step_over_p): Take target-side breakpoint condition into
5272 consideration.
5273
5e1dc496
LM
52742012-02-24 Luis Machado <lgustavo@codesourcery>
5275
5276 * server.h: Include tracepoint.h.
5277 (agent_mem_read, agent_get_trace_state_variable_value,
5278 agent_set_trace_state_variable_value,
5279 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5280 get_set_tsv_func_addr): New prototypes.
5281
5282 * ax.h: New include file.
5283 * ax.c: New source file.
5284
5285 * tracepoint.c: Include ax.h.
5286 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5287 agent_expr, eval_result_type): Move to ax.h.
5288 (parse_agent_expr): Rename to ...
5289 (gdb_parse_agent_expr): ... this, make it non-static and move
5290 to ax.h.
5291 (unparse_agent_expr) Rename to ...
5292 (gdb_unparse_agent_expr): ... this, make it non-static and move
5293 to ax.h.
5294 (eval_agent_expr): Rename to ...
5295 (eval_tracepoint_agent_expr): ... this.
5296 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5297 forward declarations.
5298 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5299 (agent_get_trace_state_variable_value): New function.
5300 (agent_set_trace_state_variable_value): New function.
5301 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5302 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5303 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5304 (condition_true_at_tracepoint): Likewise.
5305 (parse_agent_expr): Rename to ...
5306 (gdb_parse_agent_expr): ... this and move to ax.c.
5307 (unparse_agent_expr): Rename to ...
5308 (gdb_unparse_agent_expr): ... this and move to ax.c.
5309 (gdb_agent_op_name): Move to ax.c.
5310 (eval_agent_expr): Rename to ...
5311 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5312 and move to ax.c.
5313 (eval_tracepoint_agent_expr): New function.
5314 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5315 non-static.
5e1dc496
LM
5316 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5317 ax.c.
5318 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5319 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5320 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5321 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5322 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5323 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5324 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5325 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5326 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5327 (compile_bytecodes): Remove forward declaration.
5328 (is_goto_target): Move to ax.c.
5329 (compile_bytecodes): Move to ax.c and call
5330 agent_get_trace_state_variable_value (...) and
5331 agent_set_trace_state_variable_value (...).
5332
5333 * Makefile.in: Update ax.c and IPA dependencies.
5334
277e4e52
PA
53352012-02-24 Pedro Alves <palves@redhat.com>
5336
5337 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5338 (cmd_bigqtbuffer_circular): ... this. Only handle
5339 'QTBuffer:circular:'.
5340 (handle_tracepoint_general_set): Adjust.
5341
bf4c19f7
YQ
53422012-02-16 Yao Qi <yao@codesourcery.com>
5343
5344 * inferiors.c: Move code to ...
5345 * dll.c: .... here. New.
5346 * server.h: Declare clear_dlls.
5347 * Makefile.in (SFILES): Add dll.c.
5348 (OBS): Add dll.o
5349 (dll.o): New rule.
5350
d73f2619
YQ
53512012-02-11 Yao Qi <yao@codesourcery.com>
5352
5353 * server.c: (handle_monitor_command): Add a new parameter
5354 `own_buf'.
5355 (handle_query): Update caller.
5356
f8255c2a
JB
53572012-02-09 Joel Brobecker <brobecker@adacore.com>
5358
5359 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5360 * configure, config.in: Regenerate.
5361 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5362 is not defined.
5363
da84f473
PA
53642012-02-02 Pedro Alves <palves@redhat.com>
5365
5366 Try SIGKILL first, then PTRACE_KILL.
5367 * linux-low.c (linux_kill_one_lwp): New.
5368 (linux_kill_one_lwp): Rename to ...
5369 (kill_one_lwp_callback): ... this. Use the new
5370 linux_kill_one_lwp.
5371
e886a173
PA
53722012-02-02 Pedro Alves <palves@redhat.com>
5373
5374 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5375 inferior.
5376
be07f1a2
PA
53772012-01-27 Pedro Alves <palves@redhat.com>
5378
5379 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5380 (elf_64_file_p): Make static.
5381 (linux_pid_exe_is_elf_64_file): New.
5382 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5383 Delete declarations.
5384 (linux_pid_exe_is_elf_64_file): Declare.
5385 * linux-x86-low.c (x86_arch_setup): Use
5386 linux_pid_exe_is_elf_64_file.
5387
d8301ad1
JK
53882012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5389
5390 * linux-low.c (linux_wait_for_event_1): Rename to ...
5391 (linux_wait_for_event): ... here and merge it with former
5392 linux_wait_for_event - new variable wait_ptid, use it.
5393 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5394
01b17894
PA
53952012-01-23 Pedro Alves <palves@redhat.com>
5396
5397 * server.c (main): Avoid yet another case of infinite loop while
5398 detaching/killing after a longjmp.
5399
e825046f
JK
54002012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5401
5402 Code cleanup.
5403 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5404
b9e7b9c3
UW
54052012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5406
5407 * hostio.c (handle_readlink): New function.
5408 (handle_vFile): Call it to handle "vFile:readlink" packets.
5409
901f9912
UW
54102012-01-20 Pedro Alves <palves@redhat.com>
5411 Ulrich Weigand <ulrich.weigand@linaro.org>
5412
5413 * server.c (handle_v_requests): Only support vAttach and vRun to
5414 start multiple processes when in extended protocol mode.
5415
fc1ab1a0
PA
54162012-01-17 Pedro Alves <palves@redhat.com>
5417
5418 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5419 memalign plus mprotect to allocate the scratch buffer.
5420
7d5d4e98
PA
54212012-01-13 Pedro Alves <palves@redhat.com>
5422
5423 * server.c (attach_inferior): Clear `cont_thread'.
5424
f128d5e9
PA
54252012-01-13 Pedro Alves <palves@redhat.com>
5426
5427 * server.c (main): Avoid infinite loop while detaching/killing
5428 after a longjmp.
5429
06db92f0
DE
54302012-01-09 Doug Evans <dje@google.com>
5431
5432 * server.c (start_inferior): Set last_ptid in --wrapper case.
5433
32d92999
YQ
54342012-01-06 Yao Qi <yao@codesourcery.com>
5435
5436 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5437 defined.
5438 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5439
5e0a92a9
YQ
54402012-01-04 Yao Qi <yao@codesourcery.com>
5441
5442 * tracepoint.c (cmd_qtdp): Print debug message
5443 for static tracepoint.
5444
ae639e8c
YQ
54452012-01-04 Yao Qi <yao@codesourcery.com>
5446
5447 * tracepoint.c (trace_vdebug): Differentiate debug message
5448 between gdbserver and IPA.
5449
f72429c5
YQ
54502012-01-03 Yao Qi <yao@codesourcery.com>
5451
5452 * tracepoint.c (tracepoint_was_hit): Don't collect for
5453 static tracepoint.
5454
12c3e59c
JB
54552012-01-02 Joel Brobecker <brobecker@adacore.com>
5456
5457 * terminal.h: Reformat copyright header.
5458
67827812
JB
54592012-01-02 Joel Brobecker <brobecker@adacore.com>
5460
5461 * server.c (gdbserver_version): Update copyright year.
5462 * gdbreplay.c (gdbreplay_version): Likewise.
5463
3e52c33d
JK
54642011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5465
5466 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5467
5468 Revert:
5469 2011-12-18 Hui Zhu <teawater@gmail.com>
5470 * linux-low.c (linux_create_inferior): Save return value to ret.
5471
66f1260e
HZ
54722011-12-18 Hui Zhu <teawater@gmail.com>
5473
5474 * linux-low.c (linux_create_inferior): Save return value to ret.
5475
e77616d7
DE
54762011-12-16 Doug Evans <dje@google.com>
5477
e7b06c57
DE
5478 * linux-low.c (linux_create_inferior): If stdio connection,
5479 redirect stdin from /dev/null, stdout to stderr.
5480 * remote-utils.c (remote_is_stdio): New static global.
5481 (remote_connection_is_stdio): New function.
5482 (remote_prepare): Handle stdio connection.
5483 (remote_open): Ditto.
5484 (remote_close): Don't close stdin for stdio connections.
5485 (read_prim,write_prim): New functions. Replace all calls to
5486 read/write to these.
5487 * server.c (main): Watch for "-" argument. Move call to
5488 remote_prepare before start_inferior.
5489 * server.h (STDIO_CONNECTION_NAME): New macro.
5490 (remote_connection_is_stdio): Declare.
5491
e77616d7
DE
5492 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5493 in debugging output.
5494
82067193
YQ
54952011-12-15 Yao Qi <yao@codesourcery.com>
5496
5497 * tracepoint.c: Include sys/syscall.h.
5498 (gdb_ust_thread): Remove preprocessor conditional.
5499
82bfbe7e
PA
55002011-12-14 Pedro Alves <pedro@codesourcery.com>
5501
5502 * linux-low.c (linux_detach_one_lwp): Call
5503 the_low_target.prepare_to_resume before detaching.
5504
712c6575
YQ
55052011-12-14 Yao Qi <yao@codesourcery.com>
5506
5507 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5508 of write.
5509
d54d1edf
YQ
55102011-12-14 Yao Qi <yao@codesourcery.com>
5511
5512 * i386-low.c (i386_low_stopped_data_address): Initialize local
5513 variable `control'.
5514
6210a125
PA
55152011-12-13 Pedro Alves <pedro@codesourcery.com>
5516
5517 PR remote/13492
5518
5519 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5520 DR_CONTROL unless necessary. Extend comments.
5521 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5522 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5523
2ece8244
YQ
55242011-12-13 Yao Qi <yao@codesourcery.com>
5525
5526 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5527 macros.
5528 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5529
784867a5
JK
55302011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5531
5532 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5533 Print new debug message for such case.
5534
6bf36717
JK
55352011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5536
5537 Fix overlapping memcpy.
5538 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5539 the read_inferior_memory transfer.
5540 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5541 write_inferior_memory transfer.
5542 (set_fast_tracepoint_jump): New variable buf. Use it for the
5543 read_inferior_memory and write_inferior_memory transfers.
5544 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5545 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5546 Use it for the write_inferior_memory transfer.
5547 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5548 buffers.
5549
50275556
MR
55502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5551
5552 * linux-low.c (fetch_register, store_register): Make code
5553 consistent, fix formatting.
5554
7325beb4
MR
55552011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5556
5557 * linux-low.c (usr_store_inferior_registers): Factor out code
5558 to handle individual registers into...
5559 (store_register): ... this new function.
5560
c642a434
UW
55612011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5562
5563 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5564 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5565 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5566 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5567 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5568 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5569 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5570 (srv_xmlfiles): Add new XML files.
5571
5572 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5573 and <sys/uio.h>.
5574 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5575 (init_registers_s390_linux32v1): Add prototype.
5576 (init_registers_s390_linux32v2): Likewise.
5577 (init_registers_s390_linux64v1): Likewise.
5578 (init_registers_s390_linux64v2): Likewise.
5579 (init_registers_s390x_linux64v1): Likewise.
5580 (init_registers_s390x_linux64v2): Likewise.
5581 (s390_num_regs): Increment to 52.
5582 (s390_regmap): Add orig_r2 register.
5583 (s390_num_regs_3264): Increment to 68.
5584 (s390_regmap_3264): Add orig_r2 register.
5585 (s390_collect_ptrace_register): Handle orig_r2 register.
5586 (s390_supply_ptrace_register): Likewise.
5587 (s390_fill_last_break): New function.
5588 (s390_store_last_break): Likewise.
5589 (s390_fill_system_call): New function.
5590 (s390_store_system_call): Likewise.
5591 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5592 register sets.
5593 (s390_check_regset): New function.
5594 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5595 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5596 Update target_regsets for available register sets.
5597
2268b414
JK
55982011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5599 Jan Kratochvil <jan.kratochvil@redhat.com>
5600
5601 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5602 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5603 New.
5604 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5605 * linux-low.h (struct process_info_private): New member r_debug.
5606 * server.c (handle_qxfer_libraries): Call
5607 the_target->qxfer_libraries_svr4.
5608 (handle_qxfer_libraries_svr4): New function.
5609 (qxfer_packets): New entry "libraries-svr4".
5610 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5611 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5612 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5613 PACKET_qXfer_libraries_svr4.
5614
d6db1fab
UW
56152011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5616
5617 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5618 PSW address/mask between 8-byte and 16-byte formats.
5619 (s390_supply_ptrace_register): Likewise.
5620 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5621 basic addressing mode bit.
5622
242f5f1c
SS
56232011-11-24 Stan Shebs <stan@codesourcery.com>
5624
5625 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5626
f196051f
SS
56272011-11-17 Stan Shebs <stan@codesourcery.com>
5628
5629 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5630 (tracing_start_time): New global.
5631 (tracing_stop_time): New global.
5632 (tracing_user_name): New global.
5633 (tracing_notes): New global.
5634 (tracing_stop_note): New global.
5635 (cmd_qtstart): Set traceframe_usage, start_time.
5636 (stop_tracing): Set stop_time.
5637 (cmd_qtstatus): Report additional status.
5638 (cmd_qtp): New function.
5639 (handle_tracepoint_query): Call it.
5640 (cmd_qtnotes): New function.
5641 (handle_tracepoint_general_set): Call it.
5642 (get_timestamp): Rename from tsv_get_timestamp.
5643
405f8e94
SS
56442011-11-14 Stan Shebs <stan@codesourcery.com>
5645 Kwok Cheung Yeung <kcy@codesourcery.com>
5646
5647 * linux-x86-low.c (small_jump_insn): New.
5648 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5649 trampoline and error message, build a trampoline and issue a small
5650 jump instruction to it.
5651 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5652 trampoline and error message.
5653 (x86_get_min_fast_tracepoint_insn_len): New.
5654 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5655 * linux-low.h (struct linux_target_ops): Add arguments to
5656 install_fast_tracepoint_jump_pad operation, add new operation.
5657 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5658 arguments.
5659 (linux_get_min_fast_tracepoint_insn_len): New function.
5660 (linux_target_op): Add new operation.
5661 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5662 (gdb_trampoline_buffer_end): Ditto.
5663 (gdb_trampoline_buffer_error): Ditto.
5664 (struct ipa_sym_addresses): Add fields for new IPA variables.
5665 (symbol_list): Add entries for new IPA variables.
5666 (struct tracepoint): Add fields to hold the address range of the
5667 trampoline used by the tracepoint.
5668 (trampoline_buffer_head): New static variable.
5669 (trampoline_buffer_tail): Ditto.
5670 (claim_trampoline_space): New function.
5671 (have_fast_tracepoint_trampoline_buffer): New function.
5672 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5673 structure.
5674 (install_fast_tracepoint): Ditto, also add error buffer argument.
5675 (cmd_qtminftpilen): New function.
5676 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5677 (fast_tracepoint_from_trampoline_address): New function.
5678 (fast_tracepoint_collecting): Handle trampoline as part of jump
5679 pad space.
5680 (set_trampoline_buffer_space): New function.
5681 (initialize_tracepoint): Initialize new IPA variables.
5682 * target.h (struct target_ops): Add arguments to
5683 install_fast_tracepoint_jump_pad operation, add new
5684 get_min_fast_tracepoint_insn_len operation.
5685 (target_get_min_fast_tracepoint_insn_len): New.
5686 (install_fast_tracepoint_jump_pad): Add arguments.
5687 * server.h (IPA_BUFSIZ): Define.
5688 * linux-i386-ipa.c: Include extra header files.
5689 (initialize_fast_tracepoint_trampoline_buffer): New function.
5690 (initialize_low_tracepoint): Call it.
5691 * server.h (set_trampoline_buffer_space): Declare.
5692 (claim_trampoline_space): Ditto.
5693 (have_fast_tracepoint_trampoline_buffer): Ditto.
5694
1e4d1764
YQ
56952011-11-14 Yao Qi <yao@codesourcery.com>
5696
5697 * server.c (handle_query): Handle InstallInTrace for qSupported.
5698 * tracepoint.c (add_tracepoint): Sort list.
5699 (install_tracepoint, download_tracepoint): New.
5700 (cmd_qtdp): Call them to install and download tracepoints.
5701 (sort_tracepoints): Removed.
5702 (cmd_qtstart): Update.
5703
5c73ff4e
YQ
57042011-11-14 Yao Qi <yao@codesourcery.com>
5705
5706 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5707 * mem-break.h: Declare.
5708 * tracepoint.c (cmd_qtstart): Move some code to ...
5709 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5710 New.
5711 (download_tracepoints): Move some code to ...
5712 (download_tracepoint_1): ... here. New.
5713
86a30030
YQ
57142011-11-08 Yao Qi <yao@codesourcery.com>
5715
5716 * remote-utils.c (relocate_instruction): A comment fix.
5717
8d26e50c
JB
57182011-11-07 Joel Brobecker <brobecker@adacore.com>
5719
5720 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5721 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5722 dr_status_mirror and dr_control_mirror from debug_reg_state.
5723 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5724 (i386_initial_stuff): Remove use of deleted globals.
5725 (i386_get_thread_context, i386_set_thread_context,
5726 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5727 from debug_reg_state.
5728
a59306a3
YQ
57292011-11-05 Yao Qi <yao@codesourcery.com>
5730
5731 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5732 address as TPOINT's.
5733
3065dfb6
SS
57342011-11-02 Stan Shebs <stan@codesourcery.com>
5735
5736 * tracepoint.c (agent_mem_read_string): New function.
5737 (eval_agent_expr): Call it for tracenz.
5738 * server.c (handle_query): Report support for tracenz.
5739
fd0d8c7c
YQ
57402011-11-02 Yao Qi <yao@codesourcery.com>
5741
5742 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5743
609086b1
YQ
57442011-11-02 Yao Qi <yao@codesourcery.com>
5745
5746 * target.h: Fix a typo in comment.
5747
b9fd1791
PA
57482011-10-31 Pedro Alves <pedro@codesourcery.com>
5749
5750 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5751 clobber the breakpoints' shadows with fast tracepoint jumps.
5752 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5753 * target.c (write_inferior_memory): Also pass MYADDR down to
5754 check_mem_write.
5755
03583c20
UW
57562011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5757
5758 * configure.ac: Check support for personality routine.
5759 * configure: Regenerate.
5760 * config.in: Likewise.
5761 * linux-low.c: Include <sys/personality.h>.
5762 Define ADDR_NO_RANDOMIZE if necessary.
5763 (linux_create_inferior): Disable address space randomization when
5764 forking inferior, if requested.
5765 (linux_supports_disable_randomization): New function.
5766 (linux_target_ops): Install it.
5767 * server.h (disable_randomization): Declare.
5768 * server.c (disable_randomization): New global variable.
5769 (handle_general_set): Handle QDisableRandomization.
5770 (handle_query): Likewise for qSupported.
5771 (main): Support --disable-randomization and --no-disable-randomization
5772 command line arguments.
5773 * target.h (struct target_ops): Add supports_disable_randomization.
5774 (target_supports_disable_randomization): New macro.
5775
723b724b
MF
57762011-09-29 Mike Frysinger <vapier@gentoo.org>
5777
5778 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5779 ifdef check.
5780 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5781 [!PT_GETDSBT] (target_loadmap): New definition.
5782 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5783 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5784 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5785 and PT_GETDSBT to LINUX_LOADMAP.
5786 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5787 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5788
55329a5c 57892011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5790
5791 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5792 (arm_linux_hwbp_cap): New static variable.
5793 (arm_linux_get_hwbp_cap): Replace by ...
5794 (arm_linux_init_hwbp_cap): ... this new function.
5795 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5796 (arm_linux_get_hw_watchpoint_count): Likewise.
5797 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5798 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5799 (arm_prepare_to_resume): Use perror_with_name instead of error.
5800
55329a5c 58012011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5802
5803 * linux-arm-low.c: Include <signal.h>.
5804 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5805 (struct arm_linux_hwbp_cap): New data type.
5806 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5807 (struct arm_linux_hw_breakpoint): New data type.
5808 (MAX_BPTS, MAX_WPTS): Define.
5809 (struct arch_process_info, struct arch_lwp_info): New data types.
5810 (arm_linux_get_hwbp_cap): New function.
5811 (arm_linux_get_hw_breakpoint_count): Likewise.
5812 (arm_linux_get_hw_watchpoint_count): Likewise.
5813 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5814 (arm_hwbp_control_initialize): Likewise.
5815 (arm_hwbp_control_is_enabled): Likewise.
5816 (arm_hwbp_control_is_initialized): Likewise.
5817 (arm_hwbp_control_disable): Likewise.
5818 (arm_linux_hw_breakpoint_equal): Likewise.
5819 (arm_linux_hw_point_initialize): Likewise.
5820 (struct update_registers_data): New data structure.
5821 (update_registers_callback: New function.
5822 (arm_insert_point): Likewise.
5823 (arm_remove_point): Likewise.
5824 (arm_stopped_by_watchpoint): Likewise.
5825 (arm_stopped_data_address): Likewise.
5826 (arm_new_process): Likewise.
5827 (arm_new_thread): Likewise.
5828 (arm_prepare_to_resume): Likewise.
5829 (the_low_target): Register arm_insert_point, arm_remove_point,
5830 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5831 arm_new_thread, and arm_prepare_to_resume.
5832
6b9801d4
SS
58332011-09-15 Stan Shebs <stan@codesourcery.com>
5834
5835 * server.h (struct emit_ops): Add compare-goto fields.
5836 * tracepoint.c (gdb_agent_op_sizes): New table.
5837 (emit_eq_goto): New function.
5838 (emit_ne_goto): New function.
5839 (emit_lt_goto): New function.
5840 (emit_le_goto): New function.
5841 (emit_gt_goto): New function.
5842 (emit_ge_goto): New function.
5843 (is_goto_target): New function.
5844 (compile_bytecodes): Recognize special cases of compare-goto
5845 combinations and call specialized emitters for them.
5846 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5847 (amd64_emit_ne_goto): New function.
5848 (amd64_emit_lt_goto): New function.
5849 (amd64_emit_le_goto): New function.
5850 (amd64_emit_gt_goto): New function.
5851 (amd64_emit_ge_goto): New function.
5852 (amd64_emit_ops): Add the new functions.
5853 (i386_emit_eq_goto): New function.
5854 (i386_emit_ne_goto): New function.
5855 (i386_emit_lt_goto): New function.
5856 (i386_emit_le_goto): New function.
5857 (i386_emit_gt_goto): New function.
5858 (i386_emit_ge_goto): New function.
5859 (i386_emit_ops): Add the new functions.
5860
bf15cbda
SS
58612011-09-08 Stan Shebs <stan@codesourcery.com>
5862
5863 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5864 (i386_emit_epilogue): Restore %ebx.
5865
943ca1dd
JZ
58662011-08-31 Jie Zhang <jzhang918@gmail.com>
5867
5868 * server.c (step_thread): Remove definition.
5869 (process_serial_event): Don't handle Hs.
5870 * server.h (step_thread): Remove declaration.
5871 * target.c (set_desired_inferior): Remove use of step_thread.
5872
e3deef73
LM
58732011-08-24 Luis Machado <lgustavo@codesourcery.com>
5874
5875 * linux-low.c: Include linux-procfs.h.
5876 (linux_attach_lwp_1): Update comments.
5877 (linux_attach): Scan for existing threads when attaching to a
5878 process that is the tgid.
5879 * Makefile.in: Update dependencies.
5880
13da1c97
LM
58812011-08-24 Luis Machado <lgustavo@codesourcery.com>
5882
5883 * configure.srv: Add linux-procfs.o dependencies.
5884
881127c9
YQ
58852011-08-14 Yao Qi <yao@codesourcery.com>
5886
5887 * target.h (struct target_ops): Fix indent.
5888 * win32-low.c (win32_target_ops): Fix comment.
5889
58dbd541
YQ
58902011-08-14 Andrew Jenner <andrew@codesourcery.com>
5891 Yao Qi <yao@codesourcery.com>
5892
5893 * Makefile.in (clean): Remove tic6x-*.c files.
5894 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5895 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5896 (tic6x-c64xp-linux.c): Likewise.
5897 * configure.srv: Add support for tic6x-*-uclinux.
5898 * linux-tic6x-low.c: New.
5899 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5900
78d85199
YQ
59012011-08-14 Andrew Stubbs <ams@codesourcery.com>
5902 Yao Qi <yao@codesourcery.com>
5903
5904 * target.h (struct target_ops): Add read_loadmap.
5905 * linux-low.c (struct target_loadseg): New type.
5906 (struct target_loadmap): New type.
5907 (linux_read_loadmap): New function.
5908 (linux_target_ops): Add linux_read_loadmap.
5909 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5910 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5911 to NULL.
78d85199 5912
a959a88d
EZ
59132011-08-05 Eli Zaretskii <eliz@gnu.org>
5914
5915 * win32-low.c: Include <stdint.h>.
5916
1ced966e
PA
59172011-07-22 Pedro Alves <pedro@codesourcery.com>
5918
5919 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5920 to the inferior here.
5921 (i386_remove_aligned_watchpoint): Ditto.
5922 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5923 fit part of the watchpoint in the debug registers.
5924 (i386_update_inferior_debug_regs): New.
5925 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5926 registers, and only update the inferior on success.
5927 (i386_low_remove_watchpoint): Ditto.
5928
d26e3629
KY
59292011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5930
5931 * linux-low.c (compare_ints, unique, list_threads, show_process,
5932 linux_core_of_thread): Delete.
5933 (linux_target_ops): Change linux_core_of_thread to
5934 linux_common_core_of_thread.
5935 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5936 * utils.c (malloc_failure): Change type of argument.
5937 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5938 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5939 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5940 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5941 (IPA_OBJS): Add common-utils-ipa.o.
5942 (ptid_h, linux_osdata_h): New macros.
5943 (server_h): Add common/common-utils.h, common/xml-utils.h,
5944 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5945 common/ptid.h.
5946 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5947 ptid.o, buffer.o): New rules.
5948 (linux-low.o): Add common/linux-osdata.h as a dependency.
5949 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5950 * configure.ac: Add AC_HEADER_DIRENT check.
5951 * config.in: Regenerate.
5952 * configure: Regenerate.
5953 * remote-utils.c (xml_escape_text): Delete.
5954 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5955 buffer_xml_printf): Move to common/buffer.c.
5956 * server.c (main): Remove call to initialize_inferiors.
5957 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5958 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5959 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5960 internal_error, gdb_assert, gdb_assert_fail): Delete.
5961 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5962 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5963 common/buffer.h.
5964 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5965 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5966 initialize_inferiors): Delete.
5967
2275a1a7
PA
59682011-07-20 Pedro Alves <pedro@codesourcery.com>
5969
5970 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5971 symbol error.
5972
0a5b1e09
PA
59732011-05-31 Pedro Alves <pedro@codesourcery.com>
5974
5975 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5976 assertion.
5977 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5978
6938fd34
YQ
59792011-05-26 Yao Qi <yao@codesourcery.com>
5980
5981 * Makefile.in (thread-db.o): Track dependence to
5982 common/gdb_thread_db.h.
5983 * thread-db.c: include gdb_thread_db.h from right place.
5984
b481f9e0
TT
59852011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5986
5987 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5988 __FILE__ and __LINE__ to internal_error.
5989
98a5dd13
DE
59902011-05-13 Doug Evans <dje@google.com>
5991
5992 * thread-db.c (try_thread_db_load_from_sdir): New function.
5993 (try_thread_db_load_from_dir): New function.
5994 (thread_db_load_search): Handle $sdir, ignore $pdir.
5995 Remove trying of system directories if search of
5996 libthread-db-search-path fails, that is now done via $sdir.
5997
d248b706
KY
59982011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5999
6000 * server.c (handle_query): Add EnableDisableTracepoints to the list
6001 of supported features.
43aaf8b6 6002 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6003 tracepoints.
43aaf8b6
PA
6004 (cmd_qtenable_disable): New.
6005 (cmd_qtstart): Install tracepoints even if disabled.
6006 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6007 receiving a QTEnable or QTDisable packet.
6008 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6009 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6010 tracepoints.
6011 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6012
84e578fb
DE
60132011-05-10 Doug Evans <dje@google.com>
6014
6015 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6016
71f55dd8
DE
60172011-05-04 Doug Evans <dje@google.com>
6018
6019 * linux-low.c (linux_join): Skip process lookup.
6020 * spu-low.c (spu_join): Ditto.
6021 * server.c (join_inferiors_callback): Delete.
6022 (process_serial_event): For 'D' packet (detach) call join_inferior
6023 directly.
6024
4d393d60
JM
60252011-05-04 Joseph Myers <joseph@codesourcery.com>
6026
6027 * README: Don't mention xscale*-*-linux*.
6028 * configure.srv (xscale*-*-linux*): Don't handle target.
6029
b00ad6ff
NF
60302011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6031
6032 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6033 casting pointers.
6034 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6035 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6036 (i386_emit_void_call_2): Likewise.
6037
af96c192
YQ
60382011-04-26 Yao Qi <yao@codesourcery.com>
6039
43aaf8b6
PA
6040 * linux-low.c: Move common macros to linux-ptrace.h.
6041 Include linux-ptrace.h.
af96c192
YQ
6042 * Makefile.in (linux_ptrace_h): New.
6043 (linux-low.o): Depends on linux-ptrace.h.
6044
03f2bd59
JK
60452011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6046
6047 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6048 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6049 (remote_prepare): New function with most of the TCP code from ...
6050 (remote_open): ... here. Detect PORT here unconditionally. Move also
6051 setting transport_is_reliable.
6052 * server.c (run_once): New variable.
6053 (gdbserver_usage): Document it.
6054 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6055 the first run if RUN_ONCE.
6056 * server.h (run_once, remote_prepare): New declarations.
6057
7a9dd1b2
TT
60582011-04-19 Tom Tromey <tromey@redhat.com>
6059
6060 * win32-low.c (handle_load_dll): Remove duplicate "the".
6061
81239425
PM
60622011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6063
6064 Remove support for old Cygwin 1.5 versions.
6065 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6066 function to avoid warning.
6067 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6068 warning.
6069
9e0627f1
PM
60702011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6071
6072 * gdbserver/server.h (Macro _): Define it if not available.
6073
588eebee
MS
60742011-03-14 Michael Snyder <msnyder@vmware.com>
6075
348af9f7 6076 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6077
43f70d4c
JB
60782011-03-10 Joel Brobecker <brobecker@adacore.com>
6079
6080 * Makefile.in (maintainer-clean realclean distclean): Remove
6081 "make ... subdir_do" command.
6082
348af9f7
MS
60832011-03-10 Michael Snyder <msnyder@vmware.com>
6084
6085 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6086
6087 * server.c (handle_v_run): Free alloced buffer on early return.
6088
e637a4f5
YQ
60892011-03-09 Yao Qi <yao@codesourcery.com>
6090
6091 Revert:
6092 2011-03-04 Yao Qi <yao@codesourcery.com>
6093
6094 * Makefile.in: Remove GNU make feature --directory.
6095
6096 2011-03-05 Yao Qi <yao@codesourcery.com>
6097
6098 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6099 (subdir_do): New make target. Copied from gdb/Makefile.
6100 (maintainer-clean, realclean, distclean, clean): Call corresponding
6101 make targets in common/Makefile.
6102
6103 2011-02-11 Yao Qi <yao@codesourcery.com>
6104
6105 * configure.ac: Call AC_PROG_RANLIB.
6106 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6107 * configure: Regenerate.
6108
e6edda56
JK
61092011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6110
6111 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6112
e5141119
JB
61132011-03-06 Yao Qi <yao@codesourcery.com>
6114
6115 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6116
64794aa4
JB
61172011-03-05 Yao Qi <yao@codesourcery.com>
6118
6119 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6120 (subdir_do): New make target. Copied from gdb/Makefile.
6121 (maintainer-clean, realclean, distclean, clean): Call corresponding
6122 make targets in common/Makefile.
6123
7a762829
YQ
61242011-03-04 Yao Qi <yao@codesourcery.com>
6125
6126 * Makefile.in: Remove GNU make feature --directory.
6127
348af9f7
MS
61282011-03-04 Michael Snyder <msnyder@vmware.com>
6129
6130 * server.c (queue_stop_reply): Call xmalloc not malloc.
6131
61322011-03-02 Michael Snyder <msnyder@vmware.com>
6133
6134 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6135
9f72fee2
MS
61362011-02-28 Michael Snyder <msnyder@vmware.com>
6137
588eebee
MS
6138 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6139 (cmd_qtframe): Ditto.
6140 (cmd_qtbuffer): Ditto.
6141 (cmd_bigqtbuffer): Ditto.
6142
9f72fee2
MS
6143 * utils.c (decimal2str): Initialize 'width' to nine, then
6144 don't mess with it.
6145
8040bd49
UW
61462011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6147
6148 * hostio.c (require_data): Free *data, not data.
6149
7e52cbd0
JK
61502011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6151
6152 * hostio.c (require_data): Use free, not xfree.
6153
9130f83e
MS
61542011-02-27 Michael Snyder <msnyder@vmware.com>
6155
4b812f4e
MS
6156 * server.c (handle_query): Discard unused value.
6157
9130f83e
MS
6158 * hostio.c (require_data): Free malloc memory before returning
6159 error.
6160
69d37113
MS
61612011-02-26 Michael Snyder <msnyder@vmware.com>
6162
6163 * linux-low.c (list_threads): Call closedir for dirent.
6164
35f5825a
MS
61652011-02-27 Michael Snyder <msnyder@vmware.com>
6166
2a589cef
MS
6167 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6168 a case statement falls through.
6169
0adea5f7
MS
6170 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6171
35f5825a
MS
6172 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6173 in comparison.
6174
238f1c74
MS
61752011-02-26 Michael Snyder <msnyder@vmware.com>
6176
6177 * utils.c (decimal2str): Eliminate dead code and dead param.
6178 (pulongest): Drop dead param from call to decimal2str.
6179 (plongest): Ditto.
6180
633ff500
JB
61812011-02-24 Joel Brobecker <brobecker@adacore.com>
6182
6183 Revert the following patch (not approved yet):
6184 2011-02-21 Hui Zhu <teawater@gmail.com>
6185 * tracepoint.c (tp_printf): New function.
6186 (eval_agent_expr): Handle gdb_agent_op_printf.
6187
f9c6ff72
HZ
61882011-02-21 Hui Zhu <teawater@gmail.com>
6189
6190 * tracepoint.c (tp_printf): New function.
6191 (eval_agent_expr): Handle gdb_agent_op_printf.
6192
94d5e490
TT
61932011-02-18 Tom Tromey <tromey@redhat.com>
6194
6195 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6196 (tracepoint.o): Likewise.
6197 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6198 (gdb_agent_op_names): Likewise.
6199
c7f96d2b
TT
62002011-02-18 Tom Tromey <tromey@redhat.com>
6201
6202 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6203 gdb_agent_op_rot>: New constants.
6204 (gdb_agent_op_names): Add pick and roll.
6205 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6206 cases.
6207
0feedb2c
JK
62082011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6209
6210 * aclocal.m4: Regenerated with aclocal-1.11.1.
6211
b3b9301e
PA
62122011-02-14 Pedro Alves <pedro@codesourcery.com>
6213
6214 * server.c (handle_qxfer_traceframe_info): New.
6215 (qxfer_packets): Register "traceframe-info".
6216 (handle_query): Report support for qXfer:traceframe-info:read+.
6217 * tracepoint.c (match_blocktype): New.
6218 (traceframe_find_block_type): Rename to ...
6219 (traceframe_walk_blocks): ... this. Add callback filter argument,
6220 and use it.
6221 (traceframe_find_block_type): New, reimplemented on top of
6222 traceframe_walk_blocks.
6223 (build_traceframe_info_xml): New.
6224 (traceframe_read_info): New.
6225 * server.h (traceframe_read_info): Declare.
6226
4f3e6fb7
YQ
62272011-02-11 Yao Qi <yao@codesourcery.com>
6228
6229 * configure.ac: Call AC_PROG_RANLIB.
6230 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6231 * configure: Regenerate.
6232
764880b7
PA
62332011-02-07 Pedro Alves <pedro@codesourcery.com>
6234
6235 * server.c (gdb_read_memory): Change return semantics to allow
6236 partial transfers.
6237 (handle_search_memory_1): Adjust.
6238 (process_serial_event) <'m' packet>: Handle partial transfers.
6239 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6240
1c79eb8a
PA
62412011-01-28 Pedro Alves <pedro@codesourcery.com>
6242
6243 * regcache.c (init_register_cache): Initialize
6244 regcache->register_status.
6245 (free_register_cache): Release regcache->register_status.
6246 (regcache_cpy): Copy register_status.
6247 (registers_to_string): Print 'x's for unavailable registers.
6248 (supply_register): Mark the register's status valid or
6249 unavailable, depending on whether a buffer was passed in or not.
6250 (supply_register_zeroed): New.
6251 (supply_regblock): Mark the registers' status valid or
6252 unavailable, depending on whether a buffer was passed in or not.
6253 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6254 (struct regcache): New `register_status' field.
6255 (supply_register_zeroed): Declare.
6256 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6257 supply_register_zeroed, rather than passing a NULL buffer to
6258 supply_register.
6259 * tracepoint.c (fetch_traceframe_registers): Update comment.
6260
85724a0e
PA
62612011-01-28 Pedro Alves <pedro@codesourcery.com>
6262
6263 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6264 buffer explicit.
6265
d08aafef
PA
62662011-01-25 Pedro Alves <pedro@codesourcery.com>
6267
6268 * server.h (decode_xfer_write): Change prototype.
6269 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6270 and don't extract the annex here.
6271 * server.c (decode_xfer_read): Remove `annex' parameter,
6272 and don't extract the annex here.
6273 (decode_xfer): New.
6274 (struct qxfer): New.
6275 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6276 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6277 (handle_qxfer_statictrace): New functions, abstracted out from
6278 handle_query, and made to use the struct qxfer interface.
6279 (handle_threads_qxfer_proper): Rename to ...
6280 (handle_qxfer_threads_proper): ... this.
6281 (handle_threads_qxfer): Rename to ...
6282 (handle_qxfer_threads): ... this. Adjust.
6283 (qxfer_packets): New array.
6284 (handle_qxfer): New function.
6285 (handle_query): Use handle_qxfer.
6286
493e2a69
MS
62872011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6288
6289 * gdbreplay.c: Shorten lines of >= 80 columns.
6290 * linux-low.c: Ditto.
6291 * linux-ppc-low.c: Ditto.
6292 * linux-s390-low.c: Ditto.
6293 * linux-sparc-low.c: Ditto.
6294 * linux-x86-low.c: Ditto.
6295 * linux-xtensa-low.c: Ditto.
6296 * mem-break.c: Ditto.
6297 * nto-low.c: Ditto.
6298 * regcache.h: Ditto.
6299 * remote-utils.c: Ditto.
6300 * server.c: Ditto.
6301 * server.h: Ditto.
6302 * thread-db.c: Ditto.
6303 * tracepoint.c: Ditto.
6304 * utils.c: Ditto.
6305 * win32-low.h: Ditto.
6306
44944448
JB
63072011-01-05 Joel Brobecker <brobecker@adacore.com>
6308
6309 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6310 update.
6311
71ce852c
JB
63122011-01-01 Joel Brobecker <brobecker@adacore.com>
6313
6314 * server.c (gdbserver_version): Update copyright year in version
6315 output.
6316 * gdbreplay.c (gdbreplay_version): Ditto.
6317
eb826dc6
MF
63182010-12-29 Jie Zhang <jie.zhang@analog.com>
6319
6320 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6321 * linux-bfin-low.c: New file.
6322 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6323 PT_DATA_ADDR for BFIN targets.
6324 * Makefile.in (SFILES): Add linux-bfin-low.c.
6325 (clean): Remove reg-bfin.c.
6326 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6327 * README: Mention supported Blackfin targets.
6328
39ab222a
MF
63292010-12-23 Mike Frysinger <vapier@gentoo.org>
6330
6331 * .gitignore: New file.
6332
a1f2ce7d
MF
63332010-11-16 Mike Frysinger <vapier@gentoo.org>
6334
6335 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6336
f474844c
JZ
63372010-10-22 Jie Zhang <jie@codesourcery.com>
6338
6339 * Makefile.in: Add FLAGS_TO_PASS variable.
6340 (install): Remove dependency of install-only and recursively
6341 invoke make for install-only.
6342
f1048712
DE
63432010-10-04 Doug Evans <dje@google.com>
6344
6345 * Makefile.in (uninstall): Use $(DESTDIR).
6346
b53a1623
PA
63472010-09-24 Pedro Alves <pedro@codesourcery.com>
6348
e6ee044d
PA
6349 PR gdb/11842
6350
b53a1623
PA
6351 * linux-x86-low.c (compat_siginfo_from_siginfo)
6352 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6353 si_code is < 0. Check for si_code == SI_TIMER before checking for
6354 si_code < 0.
6355
fa1bd1e4
JB
63562010-09-13 Joel Brobecker <brobecker@adacore.com>
6357
6358 * lynx-i386-low.c: New file.
6359 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6360
47fac8f8
JB
63612010-09-13 Joel Brobecker <brobecker@adacore.com>
6362
6363 * lynx-low.c (ptrace_request_to_str): Remove handling for
6364 request values that have been removed in LynxOS 5.x.
6365
1adfc54d
JB
63662010-09-13 Joel Brobecker <brobecker@adacore.com>
6367
6368 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6369 <ptrace.h>
6370
c2a66c29
NS
63712010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6372
6373 * configure.ac: Add --enable-inprocess-agent option.
6374 * configure: Rebuilt.
6375
32fcada3
YQ
63762010-09-06 Yao Qi <yao@codesourcery.com>
6377
6378 * linux-low.c (linux_kill): Remove unused variable.
6379 (linux_stabilize_threads): Likewise.
6380 * server.c (start_inferior): Likewise.
6381 (queue_stop_reply_callback): Likewise.
6382 * tracepoint.c (do_action_at_tracepoint): Likewise.
6383
0cccb683
YQ
63842010-09-06 Yao Qi <yao@codesourcery.com>
6385
6386 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6387 on return.
6388
423ec54c
JK
63892010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6390
6391 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6392
12ac6819
PA
63932010-09-06 Pedro Alves <pedro@codesourcery.com>
6394
6395 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6396 "$(IPA_DEPFILES)".
6397
8ed54b31
JB
63982010-09-01 Joel Brobecker <brobecker@adacore.com>
6399
6400 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6401 gdbserver/lynx-ppc-low.c: New files.
6402 * Makefile.in (lynx_low_h): New variable.
6403 (lynx-low.o, lynx-ppc-low.o): New rules.
6404 * configure.ac: On LynxOS, link with -lnetinet.
6405 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6406 * configure: regenerate.
6407
bb0116a4
JB
64082010-09-01 Joel Brobecker <brobecker@adacore.com>
6409
6410 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6411 * configure.ac: Add check for vasprintf and vsnprintf.
6412 * configure, config.in: Regenerate.
6413 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6414
a778ab81 64152010-09-01 Joel Brobecker <brobecker@adacore.com>
6416
6417 * gdbreplay.c: Move include of alloca.h up, next to include of
6418 malloc.h.
6419 * server.h: Add include of malloc.h.
6420 * mem-break.c: Remove include of malloc.h.
6421 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6422
8b034a19 64232010-09-01 Joel Brobecker <brobecker@adacore.com>
6424
6425 * Makefile.in (memmem.o): Build with -Wno-error.
6426
64272010-09-01 Joel Brobecker <brobecker@adacore.com>
6428
6429 * utils.c (xsnprintf): Make non-static.
6430 * server.h: Add xsnprintf declaration.
6431 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6432 replace calls to snprintf by calls to xsnprintf throughout.
6433
64342010-09-01 Joel Brobecker <brobecker@adacore.com>
6435
6436 * configure.ac: Add configure check for alloca.
6437 * configure, config.in: Regenerate.
6438 * server.h: Include alloca.h if it exists.
6439 * gdbreplay.c: Include alloca.h if it exists.
6440
1a981360
PA
64412010-08-28 Pedro Alves <pedro@codesourcery.com>
6442
6443 * linux-low.c (__SIGRTMIN): Define if not already defined.
6444 (linux_create_inferior): Check for __ANDROID__ rather than
6445 __SIGRTMIN.
6446 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6447 are already deferred.
6448 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6449 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6450 stopped and already has a pending signal to report.
6451 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6452 a pending signal to report or is moving out of a jump pad.
6453 (linux_init_signals): Check for __ANDROID__ rather than
6454 __SIGRTMIN.
6455
b4d51a55
PA
64562010-08-28 Pedro Alves <pedro@codesourcery.com>
6457
6458 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6459 debug_threads check. Avoid a linear search when not doing debug
6460 output.
6461
ec48365d
PA
64622010-08-27 Pedro Alves <pedro@codesourcery.com>
6463
6464 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6465 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6466 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6467 (process_event): Change local fd's type to gdb_fildes_t.
6468 (create_file_handler): Adjust prototype.
6469 (delete_file_handler): Adjust prototype.
6470 (handle_file_event): Adjust prototype. Use pfildes.
6471 (create_file_event): Adjsut prototype.
6472 * remote-utils.c (remote_desc, listen_desc): Change type to
6473 gdb_fildes_t.
6474 * server.h: New gdb_fildes_t typedef.
6475 [USE_WIN32API]: Include winsock2.h.
6476 (delete_file_handler, add_file_handler): Adjust prototypes.
6477 (pfildes): Declare.
6478 * utils.c (pfildes): New.
6479
854d88f0
PA
64802010-08-27 Pedro Alves <pedro@codesourcery.com>
6481
6482 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6483 * configure: Regenerate.
6484
0146f85b
PA
64852010-08-27 Pedro Alves <pedro@codesourcery.com>
6486
6487 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6488 (linux_done_accessing_memory): ... this.
6489 (linux_target_ops): Adjust.
6490 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6491 * nto-low.c (nto_target_ops): Adjust comment.
6492 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6493 * spu-low.c (spu_target_ops): Adjust comment.
6494 * target.h (target_ops): Rename unprepare_to_access_memory field
6495 to done_accessing_memory.
6496 (unprepare_to_access_memory): Rename to ...
6497 (done_accessing_memory): ... this.
6498
90d74c30
PA
64992010-08-26 Pedro Alves <pedro@codesourcery.com>
6500
6501 * linux-low.c (linux_prepare_to_access_memory): New.
6502 (linux_unprepare_to_access_memory): New.
6503 (linux_target_ops): Install them.
6504 * server.c (read_memory): Rename to ...
6505 (gdb_read_memory): ... this. Use
6506 prepare_to_access_memory/prepare_to_access_memory.
6507 (write_memory): Rename to ...
6508 (gdb_write_memory): ... this. Use
6509 prepare_to_access_memory/prepare_to_access_memory.
6510 (handle_search_memory_1): Adjust.
6511 (process_serial_event): Adjust.
6512 * target.h (struct target_ops): New fields
6513 prepare_to_access_memory and unprepare_to_access_memory.
6514 (prepare_to_access_memory, unprepare_to_access_memory): New.
6515 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6516 prepare_to_access_memory/prepare_to_access_memory.
6517 * nto-low.c (nto_target_ops): Adjust.
6518 * spu-low.c (spu_target_ops): Adjust.
6519 * win32-low.c (win32_target_ops): Adjust.
6520
fd467969
PA
65212010-08-26 Pedro Alves <pedro@codesourcery.com>
6522
6523 * Makefile.in (WARN_CFLAGS): Get it from configure.
6524 (WERROR_CFLAGS): New.
6525 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6526 * configure.ac: Introduce --enable-werror, which adds -Werror to
6527 the compiler command line. Enabled by default. Disable with
6528 --disable-werror. Add -Wdeclaration-after-statement
6529 Wpointer-arith and -Wformat-nonliteral to warning flags.
6530 * configure: Regenerate.
6531
331e2f5f
PA
65322010-08-26 Pedro Alves <pedro@codesourcery.com>
6533
6534 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6535
e581f2b4
PA
65362010-08-26 Pedro Alves <pedro@codesourcery.com>
6537
6538 * gdbreplay.c (remote_error): New.
6539 (gdbchar): New.
6540 (expect): Use gdbchar. Check for error reading from GDB.
6541 Clarify sync error output.
6542 (play): Check for errors writing to GDB.
6543 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6544 * remote-utils.c (getpkt): Check for errors writing to the remote
6545 descriptor.
6546
3c11dd79
PA
65472010-08-25 Pedro Alves <pedro@codesourcery.com>
6548
6549 * linux-low.c (linux_wait_1): Move non-debugging code out of
6550 `debug_threads' control.
6551
d20a8ad9
PA
65522010-08-25 Pedro Alves <pedro@codesourcery.com>
6553
6554 * linux-low.c (linux_wait_1): Don't set last_status here.
6555 * server.c (push_event, queue_stop_reply_callback): Assert we're
6556 not pushing a TARGET_WAITKIND_IGNORE event.
6557 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6558 (myresume, handle_target_event): Set the thread's last_resume_kind
6559 and last_status from the target returned status.
6560
964e4306
PA
65612010-08-25 Pedro Alves <pedro@codesourcery.com>
6562
6563 PR threads/10729
6564
6565 * linux-x86-low.c (update_debug_registers_callback): New.
6566 (i386_dr_low_set_addr): Use it.
6567 (i386_dr_low_get_addr): New.
6568 (i386_dr_low_set_control): Use update_debug_registers_callback.
6569 (i386_dr_low_get_control): New.
6570 (i386_dr_low_get_status): Adjust.
6571 * linux-low.c (linux_stop_lwp): New.
6572 * linux-low.h (linux_stop_lwp): Declare.
6573
6574 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6575 argument instead of a i386_debug_reg_state.
6576 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6577 a i386_debug_reg_state.
6578 (i386_insert_aligned_watchpoint): Adjust.
6579 (i386_remove_aligned_watchpoint): Adjust.
6580 (i386_low_stopped_data_address): Read the debug registers from the
6581 inferior instead of from the mirrors.
6582 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6583 (i386_dr_low_get_addr): Declare.
6584 (i386_dr_low_get_control): Declare.
6585 (i386_dr_low_get_status): Change prototype.
6586
6587 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6588 (i386_dr_low_get_addr): New.
6589 (i386_dr_low_get_control): New.
6590 (i386_dr_low_get_status): Adjust prototype. Return
6591 dr_status_mirror.
6592 (i386_initial_stuff): Clear dr_status_mirror and
6593 dr_control_mirror.
6594 (i386_get_thread_context): Adjust.
6595 (i386_set_thread_context): Adjust.
6596 (i386_thread_added): Adjust.
6597
5f21a75b
PA
65982010-08-24 Pedro Alves <pedro@codesourcery.com>
6599
6600 * linux-low.h (linux_thread_area): Delete declaration.
6601
3e4c1235
TS
66022010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6603
6604 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6605 after its termination.
6606
1971b033
PA
66072010-08-09 Pedro Alves <pedro@codesourcery.com>
6608
6609 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6610 (gdb_wants_all_stopped): Delete.
6611 (linux_wait_1): Don't call them.
6612 * server.c (handle_v_cont): Tag all threads as want-stopped.
6613 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6614 stopped as "client-wants-stopped".
6615
310444ac
PA
66162010-07-31 Pedro Alves <pedro@codesourcery.com>
6617
6618 * Makefile.in (signals_h): New.
6619 (server_h): Depend on it.
6620 (server.o): Don't depend on $(signals_def).
6621 (signals.o): Depend on $(signals_def).
6622
a19cae16
JK
66232010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6624
6625 * Makefile.in (signals_def): New.
6626 (server_h): Append include/gdb/signals.h and signals_def.
6627 (server.o): Append signals_def.
6628
30d50328
JK
66292010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6630
6631 * server.c (handle_target_event): Use target_signal_to_host for
6632 resume_info.sig initialization.
6633 * target.h (struct thread_resume) <sig>: New comment.
6634
5c3216e2
OS
66352010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6636
c6f46ca0
OS
6637 * server.c (handle_query): strcpy() the returned string from paddress()
6638 instead of sprintf().
5c3216e2
OS
6639 * utils.c (paddress): Return phex_nz().
6640
6bd31874
JB
66412010-07-07 Joel Brobecker <brobecker@adacore.com>
6642
6643 * server.c (handle_v_cont): Call mourn_inferior if process
6644 just exited.
6645 (myresume): Likewise.
6646
0fb4aa4b
PA
66472010-07-01 Pedro Alves <pedro@codesourcery.com>
6648
6649 Static tracepoints, and integration with UST.
6650
6651 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6652 * mem-break.c (uninsert_all_breakpoints)
6653 (reinsert_all_breakpoints): New.
6654 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6655 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6656 (gdb_agent_ust_loaded, helper_thread_id)
6657 (gdb_agent_helper_thread_id): New macros.
6658 (struct ipa_sym_addresses): Add addr_ust_loaded,
6659 addr_helper_thread_id, addr_cmd_buf.
6660 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6661 (in_process_agent_loaded_ust): New.
6662 (write_e_ust_not_loaded): New.
6663 (maybe_write_ipa_ust_not_loaded): New.
6664 (struct collect_static_trace_data_action): New.
6665 (enum tracepoint_type) <static_tracepoint>: New.
6666 (struct tracepoint) <handle>: Mention static tracepoints.
6667 (struct static_tracepoint_ctx): New.
6668 (CMD_BUF_SIZE): New.
6669 (add_tracepoint_action): Handle static tracepoint actions.
6670 (unprobe_marker_at): New.
6671 (clear_installed_tracepoints): Handle static tracepoints.
6672 (cmd_qtdp): Handle static tracepoints.
6673 (probe_marker_at): New.
6674 (cmd_qtstart): Handle static tracepoints.
6675 (response_tracepoint): Handle static tracepoints.
6676 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6677 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6678 (get_context_regcache): Handle static tracepoints.
6679 (do_action_at_tracepoint): Handle static tracepoint actions.
6680 (traceframe_find_block_type): Handle static trace data blocks.
6681 (traceframe_read_sdata): New.
6682 (download_tracepoints): Download static tracepoint actions.
6683 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6684 (GDB_PROBE_NAME): New.
6685 (ust_ops): New.
6686 (GET_UST_SYM): New.
6687 (USTF): New.
6688 (dlsym_ust): New.
6689 (ust_marker_to_static_tracepoint): New.
6690 (gdb_probe): New.
6691 (collect_ust_data_at_tracepoint): New.
6692 (gdb_ust_probe): New.
6693 (UNIX_PATH_MAX, SOCK_DIR): New.
6694 (gdb_ust_connect_sync_socket): New.
6695 (resume_thread, stop_thread): New.
6696 (run_inferior_command): New.
6697 (init_named_socket): New.
6698 (gdb_ust_socket_init): New.
6699 (cstr_to_hexstr): New.
6700 (next_st): New.
6701 (first_marker, next_marker): New.
6702 (response_ust_marker): New.
6703 (cmd_qtfstm, cmd_qtsstm): New.
6704 (unprobe_marker_at, probe_marker_at): New.
6705 (cmd_qtstmat, gdb_ust_thread): New.
6706 (gdb_ust_init): New.
6707 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6708 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6709 (ST_REGENTRY): New.
6710 (x86_64_st_collect_regmap): New.
6711 (X86_64_NUM_ST_COLLECT_GREGS): New.
6712 (AMD64_RIP_REGNUM): New.
6713 (supply_static_tracepoint_registers): New.
6714 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6715 (ST_REGENTRY): New.
6716 (i386_st_collect_regmap): New.
6717 (i386_NUM_ST_COLLECT_GREGS): New.
6718 (supply_static_tracepoint_registers): New.
6719 * server.c (handle_query): Handle qXfer:statictrace:read.
6720 <qSupported>: Report support for StaticTracepoints, and
6721 qXfer:statictrace:read features.
6722 * server.h (traceframe_read_sdata)
6723 (supply_static_tracepoint_registers): Declare.
6724 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6725 (unpack_varlen_hex): Include in IPA build.
6726 * Makefile.in (ustlibs, ustinc): New.
6727 (IPA_OBJS): Add remote-utils-ipa.o.
6728 ($(IPA_LIB)): Link -ldl and -lpthread.
6729 (UST_CFLAGS): New.
6730 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6731 * config.in, configure: Regenerate.
6732
9e4344e5
PA
67332010-06-20 Ian Lance Taylor <iant@google.com>
6734 Pedro Alves <pedro@codesourcery.com>
6735
6736 * linux-x86-low.c (always_true): Delete.
6737 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6738 trying to fool the compiler with always_true.
6739
c6beb2cb
PA
67402010-06-20 Pedro Alves <pedro@codesourcery.com>
6741
6742 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6743 conditions in gdbserver.
6744
d2ed6730
UW
67452010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6746
6747 * spu-low.c (spu_read_memory): Wrap around local store limit.
6748 (spu_write_memory): Likewise.
6749
4e29fb54
PA
67502010-06-15 Pedro Alves <pedro@codesourcery.com>
6751
6752 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6753 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6754 LONGEST uses.
6755 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6756 uses.
6757 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6758 uses with LONGEST uses.
6759
6a271cae
PA
67602010-06-14 Stan Shebs <stan@codesourcery.com>
6761 Pedro Alves <pedro@codesourcery.com>
6762
6763 Bytecode compiler.
6764
6765 * linux-x86-low.c: Include limits.h.
6766 (add_insns): New.
6767 (always_true): New.
6768 (EMIT_ASM): New.
6769 (EMIT_ASM32): New.
6770 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6771 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6772 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6773 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6774 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6775 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6776 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6777 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6778 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6779 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6780 (amd64_emit_void_call_2): New.
6781 (amd64_emit_ops): New.
6782 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6783 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6784 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6785 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6786 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6787 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6788 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6789 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6790 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6791 (i386_emit_stack_adjust, i386_emit_int_call_1)
6792 (i386_emit_void_call_2): New.
6793 (i386_emit_ops): New.
6794 (x86_emit_ops): New.
6795 (the_low_target): Install x86_emit_ops.
6796 * server.h (struct emit_ops): New.
6797 (get_raw_reg_func_addr): Declare.
6798 (current_insn_ptr, emit_error): Declare.
6799 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6800 (set_trace_state_variable_value): New defines.
6801 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6802 addr_get_trace_state_variable_value and
6803 addr_set_trace_state_variable_value.
6804 (symbol_list): New fields for get_raw_reg,
6805 get_trace_state_variable_value and set_trace_state_variable_value.
6806 (condfn): New typedef.
6807 (struct tracepoint): New field `compiled_cond'.
6808 (do_action_at_tracepoint): Clear compiled_cond.
6809 (get_trace_state_variable_value, set_trace_state_variable_value):
6810 Export in the IPA.
6811 (condition_true_at_tracepoint): If there's a compiled condition,
6812 run that.
6813 (current_insn_ptr, emit_error): New globals.
6814 (struct bytecode_address): New.
6815 (get_raw_reg_func_addr): New.
6816 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6817 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6818 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6819 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6820 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6821 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6822 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6823 (compile_tracepoint_condition, compile_bytecodes): New.
6824 * target.h (emit_ops): Forward declare.
6825 (struct target_ops): New field emit_ops.
6826 (target_emit_ops): New.
6827 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6828 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6829 * linux-low.c (linux_emit_ops): New.
6830 (linux_target_ops): Install it.
6831 * linux-low.h (struct linux_target_ops): New field emit_ops.
6832
92b72907
UW
68332010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6834
6835 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6836 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6837
fa593d66
PA
68382010-06-01 Pedro Alves <pedro@codesourcery.com>
6839 Stan Shebs <stan@codesourcery.com>
6840
6841 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6842 (all): Depend on $(extra_libraries).
6843 (install-only): Install the IPA.
6844 (IPA_OBJS, IPA_LIB): New.
6845 (clean): Remove the IPA lib.
6846 (IPAGENT_CFLAGS): New.
6847 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6848 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6849 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6850 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6851 * configure.ac: Check for atomic builtins support in the compiler.
6852 (IPA_DEPFILES, extra_libraries): Define.
6853 * configure.srv (ipa_obj): Add description.
6854 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6855 (i[34567]86-*-linux*): Set ipa_obj.
6856 (x86_64-*-linux*): Set ipa_obj.
6857 * linux-low.c (stabilizing_threads): New.
6858 (supports_fast_tracepoints): New.
6859 (linux_detach): Stabilize threads before detaching.
6860 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6861 the lwp is either not stabilizing, or is moving out of a jump pad.
6862 (linux_fast_tracepoint_collecting): New.
6863 (maybe_move_out_of_jump_pad): New.
6864 (enqueue_one_deferred_signal): New.
6865 (dequeue_one_deferred_signal): New.
6866 (linux_wait_for_event_1): If moving out of a jump pad, defer
6867 pending signals to later.
6868 (linux_stabilize_threads): New.
6869 (linux_wait_1): Check if threads need moving out of jump pads, and
6870 do it if so.
6871 (stuck_in_jump_pad_callback): New.
6872 (move_out_of_jump_pad_callback): New.
6873 (lwp_running): New.
6874 (linux_resume_one_lwp): Handle moving out of jump pads.
6875 (linux_set_resume_request): Dequeue deferred signals.
6876 (need_step_over_p): Also step over fast tracepoint jumps.
6877 (start_step_over): Also uninsert fast tracepoint jumps.
6878 (finish_step_over): Also reinsert fast tracepoint jumps.
6879 (linux_install_fast_tracepoint_jump): New.
6880 (linux_target_ops): Install linux_stabilize_threads and
6881 linux_install_fast_tracepoint_jump_pad.
6882 * linux-low.h (linux_target_ops) <get_thread_area,
6883 install_fast_tracepoint_jump_pad>: New fields.
6884 (struct lwp_info) <collecting_fast_tracepoint,
6885 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6886 (linux_get_thread_area): Declare.
6887 * linux-x86-low.c (jump_insn): New.
6888 (x86_get_thread_area): New.
6889 (append_insns): New.
6890 (push_opcode): New.
6891 (amd64_install_fast_tracepoint_jump_pad): New.
6892 (i386_install_fast_tracepoint_jump_pad): New.
6893 (x86_install_fast_tracepoint_jump_pad): New.
6894 (the_low_target): Install x86_get_thread_area and
6895 x86_install_fast_tracepoint_jump_pad.
6896 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6897 (struct fast_tracepoint_jump): New.
6898 (fast_tracepoint_jump_insn): New.
6899 (fast_tracepoint_jump_shadow): New.
6900 (find_fast_tracepoint_jump_at): New.
6901 (fast_tracepoint_jump_here): New.
6902 (delete_fast_tracepoint_jump): New.
6903 (set_fast_tracepoint_jump): New.
6904 (uninsert_fast_tracepoint_jumps_at): New.
6905 (reinsert_fast_tracepoint_jumps_at): New.
6906 (set_breakpoint_at): Use write_inferior_memory.
6907 (uninsert_raw_breakpoint): Use write_inferior_memory.
6908 (check_mem_read): Mask out fast tracepoint jumps.
6909 (check_mem_write): Mask out fast tracepoint jumps.
6910 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6911 (set_fast_tracepoint_jump): Declare.
6912 (delete_fast_tracepoint_jump)
6913 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6914 (reinsert_fast_tracepoint_jumps_at): Declare.
6915 * regcache.c: Don't compile many functions when building the
6916 in-process agent library.
6917 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6918 the register buffer in the heap.
6919 (free_register_cache): If the register buffer isn't owned by the
6920 regcache, don't free it.
6921 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6922 pre-existing register caches.
6923 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6924 type.
6925 (convert_ascii_to_int): : Constify `from' parameter type.
6926 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6927 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6928 the needed buffer in-place.
6929 (relocate_instruction): New.
6930 * server.c (handle_query) <qSymbols>: If the target supports
6931 tracepoints, give it a chance of looking up symbols. Report
6932 support for fast tracepoints.
6933 (handle_status): Stabilize threads.
6934 (process_serial_event): Adjust.
6935 * server.h (struct fast_tracepoint_jump): Forward declare.
6936 (struct process_info) <fast_tracepoint_jumps>: New field.
6937 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6938 (decode_X_packet, decode_M_packet): Adjust.
6939 (relocate_instruction): Declare.
6940 (in_process_agent_loaded): Declare.
6941 (tracepoint_look_up_symbols): Declare.
6942 (struct fast_tpoint_collect_status): Declare.
6943 (fast_tracepoint_collecting): Declare.
6944 (force_unlock_trace_buffer): Declare.
6945 (handle_tracepoint_bkpts): Declare.
6946 (initialize_low_tracepoint)
6947 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6948 * target.h (struct target_ops) <stabilize_threads,
6949 install_fast_tracepoint_jump_pad>: New fields.
6950 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6951 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6952 [HAVE_STDINT_H]: Include stdint.h.
6953 (trace_debug_1): Rename to ...
6954 (trace_vdebug): ... this.
6955 (trace_debug): Rename to ...
6956 (trace_debug_1): ... this. Add `level' parameter.
6957 (trace_debug): New.
6958 (ATTR_USED, ATTR_NOINLINE): New.
6959 (IP_AGENT_EXPORT): New.
6960 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6961 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6962 (about_to_request_buffer_space, trace_buffer_is_full)
6963 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6964 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6965 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6966 (traceframe_write_count, traceframes_created)
6967 (trace_state_variables)
6968 New renaming defines.
6969 (struct ipa_sym_addresses): New.
6970 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6971 (symbol_list): New.
6972 (ipa_sym_addrs): New.
6973 (all_tracepoint_symbols_looked_up): New.
6974 (in_process_agent_loaded): New.
6975 (write_e_ipa_not_loaded): New.
6976 (maybe_write_ipa_not_loaded): New.
6977 (tracepoint_look_up_symbols): New.
6978 (debug_threads) [IN_PROCESS_AGENT]: New.
6979 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6980 (UNKNOWN_SIDE_EFFECTS): New.
6981 (stop_tracing): New.
6982 (flush_trace_buffer): New.
6983 (stop_tracing_bkpt): New.
6984 (flush_trace_buffer_bkpt): New.
6985 (read_inferior_integer): New.
6986 (read_inferior_uinteger): New.
6987 (read_inferior_data_pointer): New.
6988 (write_inferior_data_pointer): New.
6989 (write_inferior_integer): New.
6990 (write_inferior_uinteger): New.
6991 (struct collect_static_trace_data_action): Delete.
6992 (enum tracepoint_type): New.
6993 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6994 <actions_str, step_actions, step_actions_str>: Only include in
6995 GDBserver.
fa593d66
PA
6996 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6997 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6998 (tracepoints): Use IP_AGENT_EXPORT.
6999 (last_tracepoint): Don't include in the IPA.
7000 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7001 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7002 (alloced_trace_state_variables): New.
7003 (trace_state_variables): Use IP_AGENT_EXPORT.
7004 (traceframe_t): Delete unused variable.
7005 (circular_trace_buffer): Don't include in the IPA.
7006 (trace_buffer_start): Delete.
7007 (struct trace_buffer_control): New.
7008 (trace_buffer_free): Delete.
7009 (struct ipa_trace_buffer_control): New.
7010 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7011 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7012 New.
7013 (trace_buffer_ctrl): New.
7014 (TRACE_BUFFER_CTRL_CURR): New.
7015 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7016 Reimplement as macros.
7017 (trace_buffer_wrap): Delete.
7018 (traceframe_write_count, traceframe_read_count)
7019 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7020 (struct tracepoint_hit_ctx) <type>: New field.
7021 (struct fast_tracepoint_ctx): New.
7022 (memory_barrier): New.
7023 (cmpxchg): New.
7024 (record_tracepoint_error): Update atomically in the IPA.
7025 (clear_inferior_trace_buffer): New.
7026 (about_to_request_buffer_space): New.
7027 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7028 updating the same buffer.
7029 (add_tracepoint): Default the tracepoint's type to trap
7030 tracepoint, and orig_size to -1.
7031 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7032 internal variables.
7033 (create_trace_state_variable): New parameter `gdb'. Handle it.
7034 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7035 (cmd_qtdp): Handle fast tracepoints.
7036 (cmd_qtdv): Adjust.
7037 (max_jump_pad_size): New.
7038 (gdb_jump_pad_head): New.
7039 (get_jump_space_head): New.
7040 (claim_jump_space): New.
7041 (sort_tracepoints): New.
7042 (MAX_JUMP_SIZE): New.
7043 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7044 IPA.
7045 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7046 support. Upload fast traceframes, and delete internal IPA
7047 breakpoints.
7048 (stop_tracing_handler): New.
7049 (flush_trace_buffer_handler): New.
7050 (cmd_qtstop): Upload fast tracepoints.
7051 (response_tracepoint): Handle fast tracepoints.
7052 (tracepoint_finished_step): Upload fast traceframes. Set the
7053 tracepoint hit context's tracepoint type.
7054 (handle_tracepoint_bkpts): New.
7055 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7056 type. Add comment about fast tracepoints.
7057 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7058 non-existing action_str field.
7059 (get_context_regcache): Handle fast tracepoints.
7060 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7061 to the regcache.
7062 (fast_tracepoint_from_jump_pad_address): New.
7063 (fast_tracepoint_from_ipa_tpoint_address): New.
7064 (collecting_t): New.
7065 (force_unlock_trace_buffer): New.
7066 (fast_tracepoint_collecting): New.
7067 (collecting): New.
7068 (gdb_collect): New.
7069 (write_inferior_data_ptr): New.
7070 (target_tp_heap): New.
7071 (target_malloc): New.
7072 (download_agent_expr): New.
7073 (UALIGN): New.
7074 (download_tracepoints): New.
7075 (download_trace_state_variables): New.
7076 (upload_fast_traceframes): New.
7077 (IPA_FIRST_TRACEFRAME): New.
7078 (IPA_NEXT_TRACEFRAME_1): New.
7079 (IPA_NEXT_TRACEFRAME): New.
7080 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7081 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7082 (gdb_jump_pad_buffer_end): New.
7083 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7084 (initialize_tracepoint): Adjust.
7085 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7086 buffer. Initialize the low module.
7087 * utils.c (PREFIX, TOOLNAME): New.
7088 (malloc_failure): Use PREFIX.
7089 (error): In the IPA, an error causes an exit.
7090 (fatal, warning): Use PREFIX.
7091 (internal_error): Use TOOLNAME.
7092 (NUMCELLS): Increase to 10.
7093 * configure, config.in: Regenerate.
7094
d149dd1d
PA
70952010-06-01 Pedro Alves <pedro@codesourcery.com>
7096
7097 * server.c (handle_query) <qSupported>: Do two passes over the
7098 qSupported string to avoid nesting strtok.
7099
f6528abd
JK
71002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7101
7102 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7103 (CDEPS): New.
7104 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7105 -Wl,--dynamic-list.
7106 * configure: Regenerate.
7107 * proc-service.list: New.
7108
ca2a87a0
JK
71092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7110
7111 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7112 New comment.
7113
363a6e9f
OS
71142010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7115
7116 * gdbreplay.c (remote_open): Check error return from socket() call by
7117 its equality to -1 not by it being negative.
7118 * remote-utils.c (remote_open): Likewise.
7119
d23b6cb1
PA
71202010-05-23 Pedro Alves <pedro@codesourcery.com>
7121
7122 * config.h: Regenerate.
7123
28d3cf85
MK
71242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7125
7126 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7127 doesn't provide PTRACE_GET_THREAD_AREA.
7128
fea36a59
MK
71292010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7130
7131 * linux-m68k-low.c: Include <asm/ptrace.h>
7132 (ps_get_thread_area): Implement.
7133
24b066ba
DE
71342010-05-03 Doug Evans <dje@google.com>
7135
7136 * event-loop.c (struct callback_event): New struct.
7137 (callback_list): New global.
7138 (append_callback_event, delete_callback_event): New functions.
7139 (process_callback): New function.
7140 (start_event_loop): Call it.
7141 * remote-utils.c (NOT_SCHEDULED): Define.
7142 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7143 moved out of readchar.
7144 (readchar): Rewrite. Call reschedule before returning.
7145 (reset_readchar): New function.
7146 (remote_close): Call it.
7147 (process_remaining, reschedule): New functions.
7148 * server.h (callback_handler_func): New typedef.
7149 (append_callback_event, delete_callback_event): Declare.
7150
9836d6ea
PA
71512010-05-03 Pedro Alves <pedro@codesourcery.com>
7152
7153 * proc-service.c (ps_pglobal_lookup): Use
7154 thread_db_look_up_one_symbol.
7155 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7156 parameter. Use it instead of all_symbols_looked_up.
7157 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7158 field.
7159 (all_symbols_looked_up): Don't declare.
7160 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7161 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7162 field.
7163 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7164 Set all_symbols_looked_up here.
7165 (thread_db_look_up_one_symbol): New.
7166 (thread_db_get_tls_address): Adjust.
7167 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7168 thread_db object on the heap, and tentatively set it in the
7169 process structure.
7170 (thread_db_init): Don't set all_symbols_looked_up here.
7171 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7172
7984d532
PA
71732010-05-03 Pedro Alves <pedro@codesourcery.com>
7174
7175 * linux-low.c (linux_kill, linux_detach): Adjust.
7176 (status_pending_p_callback): Remove redundant statement. Check
7177 for !TARGET_WAITIKIND_IGNORE, instead of
7178 TARGET_WAITKIND_STOPPED.
7179 (handle_tracepoints): Make sure LWP is locked. Adjust.
7180 (linux_wait_for_event_1): Adjust.
7181 (linux_cancel_breakpoints): New.
7182 (unsuspend_one_lwp): New.
7183 (unsuspend_all_lwps): New.
7184 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7185 (send_sigstop_callback): Change return type to int, add new
7186 `except' parameter and handle it.
7187 (suspend_and_send_sigstop_callback): New.
7188 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7189 pass them down. If SUSPEND, also increment the lwp's suspend
7190 count.
7191 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7192 (need_step_over_p): Don't consider suspended LWPs.
7193 (start_step_over): Adjust.
7194 (proceed_one_lwp): Change return type to int, add new `except'
7195 parameter and handle it.
7196 (unsuspend_and_proceed_one_lwp): New.
7197 (proceed_all_lwps): Use find_inferior instead of
7198 for_each_inferior.
7199 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7200 also decrement the suspend count of LWPs. Pass `except' down,
7201 instead of hacking its suspend count.
7202 (linux_pause_all): Add `freeze' parameter. Adjust.
7203 (linux_unpause_all): New.
7204 (linux_target_ops): Install linux_unpause_all.
7205 * server.c (handle_status): Adjust.
7206 * target.h (struct target_ops): New fields `unpause_all' and
7207 `cancel_breakpoints'. Add new parameter to `pause_all'.
7208 (pause_all): Add new `freeze' parameter.
7209 (unpause_all): New.
7210 (cancel_breakpoints): New.
7211 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7212 cancel breakpoints.
7213 (cmd_qtstart): Pause threads.
7214 (stop_tracing): Pause threads, and cancel breakpoints.
7215 * win32-low.c (win32_target_ops): Adjust.
7216
e471f25b
PA
72172010-05-03 Pedro Alves <pedro@codesourcery.com>
7218
7219 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7220 the inferior right away from here...
7221 (linux_wait_1): ... to here, and adjust to check the thread's
7222 last_resume_kind instead of the lwp's step or stop_expected flags.
7223
1915ef4f
PA
72242010-05-02 Pedro Alves <pedro@codesourcery.com>
7225
7226 * README: Use consistent `GDB' and `GDBserver' spellings.
7227
f9e39928
PA
72282010-05-02 Pedro Alves <pedro@codesourcery.com>
7229
7230 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7231 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7232 (linux_detach_one_lwp): Assume the lwp is stopped.
7233 (any_thread_of): Delete.
7234 (linux_detach): Stop all lwps here. Don't blindly delete all
7235 breakpoints.
7236 (delete_lwp_callback): New.
7237 (linux_mourn): Delete all lwps of the process that is gone.
7238 (linux_wait_1): Don't delete the last lwp of the process here.
7239 * mem-break.h (mark_breakpoints_out): Declare.
7240 * mem-break.c (mark_breakpoints_out): New.
7241 (free_all_breakpoints): Use it.
7242 * server.c (handle_target_event): If the process is gone, mark
7243 breakpoints out.
7244 * thread-db.c (struct thread_db) <create_bp>: New field.
7245 (thread_db_enable_reporting): Fix prototype. Store a thread event
7246 breakpoint reference in the thread_db struct.
7247 (thread_db_load_search): Clear the thread_db object.
7248 (try_thread_db_load_1): Ditto.
7249 (switch_to_process): New.
7250 (disable_thread_event_reporting): Use it.
7251 (remove_thread_event_breakpoints): New.
7252 (thread_db_detach, thread_db_mourn): Use it.
7253
1e7fc18c
PA
72542010-05-01 Pedro Alves <pedro@codesourcery.com>
7255
7256 * linux-low.c (linux_enable_event_reporting): New.
7257 (linux_wait_for_event_1, handle_extended_wait): Use it.
7258
02fc4de7
PA
72592010-04-30 Pedro Alves <pedro@codesourcery.com>
7260
7261 * linux-low.c (linux_kill_one_lwp, linux_kill)
7262 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7263 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7264 SIGSTOP even if the LWP is stopped.
7265 (send_sigstop_callback): New.
7266 (stop_all_lwps): Use send_sigstop_callback instead.
7267 (linux_resume_one_thread): Adjust.
7268 (proceed_one_lwp): Still proceed an LWP that the client has
7269 requested to stop, if we haven't reported it as stopped yet. Make
7270 sure that LWPs the client want stopped, have a pending SIGSTOP.
7271
bc3b5632
DE
72722010-04-26 Doug Evans <dje@google.com>
7273
ae1ada35
DE
7274 * server.c (handle_general_set): Make static.
7275
bc3b5632
DE
7276 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7277 Print received char after testing for error/eof instead of before.
7278 (input_interrupt): Tweak comment.
7279
65730243
DE
72802010-04-23 Doug Evans <dje@google.com>
7281
7282 * server.c (start_inferior): Print inferior argv if --debug.
7283
a8ae7dc0
AR
72842010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7285
7286 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7287 * nto-x86-low.c: Include server.h
7288
1c07cc19
PM
72892010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7290
7291 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7292 be consistent with other sources of this directory.
7293 (init_registers_amd64): Correct name of source file of this function
7294 in the comment.
7295
e0a61e09
PM
72962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7297
7298 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7299 64-bit executables.
7300
54709339
PM
73012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7302
7303 * win32-i386-low.c: Add 64-bit support.
7304 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7305 (init_registers_amd64): Declare.
7306 (mappings): Add 64-bit version of array.
7307 (init_windows_x86): New function.
7308 (the_low_target): Change init_arch field to init_windows_x86.
7309
e8f0053d
PM
73102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7311
7312 * win32-low.c: Adapt to support also 64-bit architecture.
7313 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7314 (get_image_name): Use SIZE_T type for local variable `done'.
7315 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7316 (toolhelp_get_dll_name): Idem.
7317 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7318 Use uintptr_t typecast to avoid warning.
7319 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7320 (handle_exception): Use phex_nz to avoid warning.
7321 (win32_wait): Remove unused local variable `process'.
7322
c481e77e
PM
73232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7324
7325 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7326 `amd64-avx.o'.
7327
12ea4b69
PM
73282010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7329
7330 * configure.ac: Use `ws2_32' library for srv_mingw.
7331 * configure: Regenerate.
7332 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7333 * remote-utils.c: Likewise.
7334
f6d1620c
L
73352010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7338 if __x86_64__ is defined.
7339
8e642873
PM
73402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7341
7342 * configure: Regenerate.
7343
711e434b
PM
73442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7345
7346 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7347 * target.h (target_ops): New get_tib_address field.
7348 * win32-low.h (win32_thread_info): Add thread_local_base field.
7349 * win32-low.c (child_add_thread): Add tlb argument.
7350 Set thread_local_base field to TLB.
7351 (get_child_debug_event): Adapt to child_add_thread change.
7352 (win32_get_tib_address): New function.
7353 (win32_target_ops): Set get_tib_address field to
7354 win32_get_tib_address.
7355 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7356
505106cd
PA
73572010-04-12 Pedro Alves <pedro@codesourcery.com>
7358
505106cd
PA
7359 * linux-low.c (linux_mourn): Also remove the process.
7360 * server.c (handle_target_event): Don't remove the process here.
7361 * nto-low.c (nto_mourn): New.
7362 (nto_target_ops): Install it.
7363 * spu-low.c (spu_mourn): New.
7364 (spu_target_ops): Install it.
7365 * win32-low.c (win32_mourn): New.
7366 (win32_target_ops): Install it.
7367
e8470a06
PA
73682010-04-12 Pedro Alves <pedro@codesourcery.com>
7369
7370 * server.h (buffer_xml_printf): Remove redundant `;'.
7371
45ba0d02
PA
73722010-04-12 Pedro Alves <pedro@codesourcery.com>
7373
7374 * regcache.c (set_register_cache): Invalidate regcaches before
7375 changing the register cache layout.
7376 (regcache_invalidate_one): Allow a NULL regcache.
7377 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7378 regcaches before changing the register cache layout or the target
7379 regsets.
7380
59e04013
L
73812010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7382
7383 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7384 variable warning on Linux/x86-64.
7385
8336d594
PA
73862010-04-11 Pedro Alves <pedro@codesourcery.com>
7387
7388 GDBserver disconnected tracing support.
7389
7390 * linux-low.c (linux_remove_process): Delete.
7391 (add_lwp): Don't set last_resume_kind here.
7392 (linux_kill): Use `mourn'.
7393 (linux_detach): Use `thread_db_detach', and `mourn'.
7394 (linux_mourn): New.
7395 (linux_attach_lwp_1): Adjust comment.
7396 (linux_attach): last_resume_kind moved the thread_info; adjust.
7397 (status_pending_p_callback): Adjust.
7398 (linux_wait_for_event_1): Adjust.
7399 (count_events_callback, select_singlestep_lwp_callback)
7400 (select_event_lwp_callback, cancel_breakpoints_callback)
7401 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7402 (proceed_one_lwp): Adjust.
7403 (linux_async): Add debug output.
7404 (linux_thread_stopped): New.
7405 (linux_pause_all): New.
7406 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7407 linux_pause_all.
7408 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7409 (thread_db_free): Delete declaration.
7410 (thread_db_detach, thread_db_mourn): Declare.
7411 * thread-db.c (thread_db_init): Use thread_db_mourn.
7412 (thread_db_free): Delete, split in two.
7413 (disable_thread_event_reporting): New.
7414 (thread_db_detach): New.
7415 (thread_db_mourn): New.
7416
7417 * server.h (struct thread_info) <last_resume_kind>: New field.
7418 <attached>: Add comment.
7419 <gdb_detached>: New field.
7420 (handler_func): Change return type to int.
7421 (handle_serial_event, handle_target_event): Ditto.
7422 (gdb_connected): Declare.
7423 (tracing): Delete.
7424 (disconnected_tracing): Declare.
7425 (stop_tracing): Declare.
7426
7427 * server.c (handle_query) <qSupported>: Report support for
7428 disconnected tracing.
7429 (queue_stop_reply_callback): Account for running threads.
7430 (gdb_wants_thread_stopped): New.
7431 (gdb_wants_all_threads_stopped): New.
7432 (gdb_reattached_process): New.
7433 (handle_status): Clear the `gdb_detached' flag of all processes.
7434 In all-stop, stop all threads.
7435 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7436 (process_serial_event): If the remote connection breaks, or if an
7437 exit was forced with "monitor exit", force an event loop exit.
7438 Handle disconnected tracing on detach.
7439 (handle_serial_event): Adjust.
7440 (handle_target_event): If GDB isn't connected, forward events back
7441 to the inferior, unless the last process exited, in which case,
7442 exit gdbserver. Adjust interface.
7443
7444 * remote-utils.c (remote_open): Don't block in accept. Instead
7445 register an event loop source on the listen socket file
7446 descriptor. Refactor bits into ...
7447 (listen_desc): ... this new global.
7448 (gdb_connected): ... this new function.
7449 (enable_async_notification): ... this new function.
7450 (handle_accept_event): ... this new function.
7451 (remote_close): Clear remote_desc.
7452
7453 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7454
7455 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7456 New fields.
7457 (mourn_inferior): Define.
7458 (target_process_qsupported): Avoid the dangling else problem.
7459 (thread_stopped): Define.
7460 (pause_all): Define.
7461 (target_waitstatus_to_string): Declare.
7462 * target.c (target_waitstatus_to_string): New.
7463
7464 * tracepoint.c (tracing): Make extern.
7465 (disconnected_tracing): New.
7466 (stop_tracing): Make extern. Handle tracing stops due to GDB
7467 disconnecting.
7468 (cmd_qtdisconnected): New.
7469 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7470 (handle_tracepoint_general_set): Handle QTDisconnected.
7471
7472 * event-loop.c (event_handler_func): Change return type to int.
7473 (process_event): Bail out if the event handler wants the event
7474 loop to stop.
7475 (handle_file_event): Ditto.
7476 (start_event_loop): Bail out if the event handler wants the event
7477 loop to stop.
7478
7479 * nto-low.c (nto_target_ops): Adjust.
7480 * spu-low.c (spu_wait): Don't remove the process here.
7481 (spu_target_ops): Adjust.
7482 * win32-low.c (win32_wait): Don't remove the process here.
7483 (win32_target_ops): Adjust.
7484
5d267c4c
PA
74852010-04-11 Pedro Alves <pedro@codesourcery.com>
7486
7487 * regcache.c (realloc_register_cache): Invalidate inferior's
7488 regcache before recreating it.
7489
623ccd72
PA
74902010-04-09 Pedro Alves <pedro@codesourcery.com>
7491
7492 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7493
219f2f23
PA
74942010-04-09 Stan Shebs <stan@codesourcery.com>
7495 Pedro Alves <pedro@codesourcery.com>
7496
7497 * server.h (LONGEST): New.
7498 (struct thread_info) <while_stepping>: New field.
7499 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7500 Declare.
7501 (initialize_tracepoint, handle_tracepoint_general_set)
7502 (handle_tracepoint_query, tracepoint_finished_step)
7503 (tracepoint_was_hit, release_while_stepping_state_list):
7504 (current_traceframe): Declare.
7505 * server.c (handle_general_set): Handle tracepoint packets.
7506 (read_memory): New.
7507 (write_memory): New.
7508 (handle_search_memory_1): Use read_memory.
7509 (handle_query): Report support for conditional tracepoints, trace
7510 state variables, and tracepoint sources. Handle tracepoint
7511 queries.
7512 (main): Initialize the tracepoints module.
7513 (process_serial_event): Handle traceframe reads/writes.
7514
7515 * linux-low.c (handle_tracepoints): New.
7516 (linux_wait_1): Call it.
7517 (linux_resume_one_lwp): Handle while-stepping.
7518 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7519 (linux_target_ops): Install them.
7520 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7521 New field.
7522 * linux-x86-low.c (x86_supports_tracepoints): New.
7523 (the_low_target). Install it.
7524
7525 * mem-break.h (delete_breakpoint): Declare.
7526 * mem-break.c (delete_breakpoint): Make external.
7527
7528 * target.h (struct target_ops): Add `supports_tracepoints',
7529 `read_pc', and `write_pc' fields.
7530 (target_supports_tracepoints): Define.
7531 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7532 (phex_nz): New.
7533
7534 * regcache.h (struct regcache) <registers_owned>: New field.
7535 (init_register_cache, regcache_cpy): Declare.
7536 (regcache_read_pc, regcache_write_pc): Declare.
7537 (register_cache_size): Declare.
7538 (supply_regblock): Declare.
7539 * regcache.c (init_register_cache): New.
7540 (new_register_cache): Use it.
7541 (regcache_cpy): New.
7542 (register_cache_size): New.
7543 (supply_regblock): New.
7544 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7545
219f2f23
PA
7546 * tracepoint.c: New.
7547
7548 * Makefile.in (OBS): Add tracepoint.o.
7549 (tracepoint.o): New rule.
7550
3a13a53b
L
75512010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7552
7553 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7554 (i386-mmx.o): New.
7555 (i386-mmx.c): Likewise.
7556 (i386-mmx-linux.o): Likewise.
7557 (i386-mmx-linux.c): Likewise.
7558
7559 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7560 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7561 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7562 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7563
7564 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7565 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7566 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7567
1570b33e
L
75682010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7569
7570 * Makefile.in (clean): Updated.
7571 (i386-avx.o): New.
7572 (i386-avx.c): Likewise.
7573 (i386-avx-linux.o): Likewise.
7574 (i386-avx-linux.c): Likewise.
7575 (amd64-avx.o): Likewise.
7576 (amd64-avx.c): Likewise.
7577 (amd64-avx-linux.o): Likewise.
7578 (amd64-avx-linux.c): Likewise.
7579
7580 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7581 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7582 (srv_amd64_regobj): Add amd64-avx.o.
7583 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7584 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7585 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7586 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7587 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7588 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7589 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7590
7591 * i387-fp.c: Include "i386-xstate.h".
7592 (i387_xsave): New.
7593 (i387_cache_to_xsave): Likewise.
7594 (i387_xsave_to_cache): Likewise.
7595 (x86_xcr0): Likewise.
7596
7597 * i387-fp.h (i387_cache_to_xsave): Likewise.
7598 (i387_xsave_to_cache): Likewise.
7599 (x86_xcr0): Likewise.
7600
7601 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7602 * linux-crisv32-low.c (target_regsets): Likewise.
7603 * linux-m68k-low.c (target_regsets): Likewise.
7604 * linux-mips-low.c (target_regsets): Likewise.
7605 * linux-ppc-low.c (target_regsets): Likewise.
7606 * linux-s390-low.c (target_regsets): Likewise.
7607 * linux-sh-low.c (target_regsets): Likewise.
7608 * linux-sparc-low.c (target_regsets): Likewise.
7609 * linux-xtensa-low.c (target_regsets): Likewise.
7610
7611 * linux-low.c: Include <sys/uio.h>.
7612 (regsets_fetch_inferior_registers): Support nt_type.
7613 (regsets_store_inferior_registers): Likewise.
7614 (linux_process_qsupported): New.
7615 (linux_target_ops): Add linux_process_qsupported.
7616
7617 * linux-low.h (regset_info): Add nt_type.
7618 (linux_target_ops): Add process_qsupported.
7619
7620 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7621 and <sys/uio.h>.
7622 (init_registers_i386_avx_linux): New.
7623 (init_registers_amd64_avx_linux): Likewise.
7624 (xmltarget_i386_linux_no_xml): Likewise.
7625 (xmltarget_amd64_linux_no_xml): Likewise.
7626 (PTRACE_GETREGSET): Likewise.
7627 (PTRACE_SETREGSET): Likewise.
7628 (x86_fill_xstateregset): Likewise.
7629 (x86_store_xstateregset): Likewise.
7630 (use_xml): Likewise.
7631 (x86_linux_update_xmltarget): Likewise.
7632 (x86_linux_process_qsupported): Likewise.
7633 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7634 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7635 init_registers_i386_linux here. Call
7636 x86_linux_update_xmltarget.
7637 (the_low_target): Add x86_linux_process_qsupported.
7638
7639 * server.c (handle_query): Call target_process_qsupported.
7640
7641 * target.h (target_ops): Add process_qsupported.
7642 (target_process_qsupported): New.
7643
fc7238bb
PA
76442010-04-03 Pedro Alves <pedro@codesourcery.com>
7645
7646 * inferiors.c (add_thread): Set last_status kind to
7647 TARGET_WAITKIND_IGNORE.
7648 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7649 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7650 (linux_wait_1): Move `thread' local definition to block that uses
7651 it. Don't NULL initialize `event_child'.
7652 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7653 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7654 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7655
bdabb078
PA
76562010-04-01 Pedro Alves <pedro@codesourcery.com>
7657
7658 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7659 an extended waitstatus, or by a watchpoint.
7660 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7661 thread was stepping or has been stopped by a watchpoint.
7662
d3bbe7a0
PA
76632010-04-01 Pedro Alves <pedro@codesourcery.com>
7664
7665 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7666 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7667 of another, then delete the previous, and validate all
7668 breakpoints.
7669 (validate_inserted_breakpoint): New.
7670 (delete_disabled_breakpoints): New.
7671 (validate_breakpoints): New.
7672 (check_mem_read): Validate breakpoints before trusting their
7673 shadow. Delete disabled breakpoints.
7674 (check_mem_write): Validate breakpoints before trusting they
7675 should be inserted. Delete disabled breakpoints.
7676 * mem-break.h (validate_breakpoints):
7677 * server.c (handle_query): Validate breakpoints when we see a
7678 qSymbol query.
7679
8b07ae33
PA
76802010-04-01 Pedro Alves <pedro@codesourcery.com>
7681
7682 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7683 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7684 if we could tell there's a GDB breakpoint at stop_pc.
7685 (need_step_over_p): Don't do a step over if we find a GDB
7686 breakpoint at the resume PC.
7687
7688 * mem-break.c (struct raw_breakpoint): New.
7689 (enum bkpt_type): New type `gdb_breakpoint'.
7690 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7691 fields. New field `raw'.
7692 (find_raw_breakpoint_at): New.
7693 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7694 breakpoint instead.
7695 (set_breakpoint_at): Adjust.
7696 (delete_raw_breakpoint): New.
7697 (release_breakpoint): New.
7698 (delete_breakpoint): Rename to...
7699 (delete_breakpoint_1): ... this. Add proc parameter. Use
7700 release_breakpoint. Return ENOENT.
7701 (delete_breakpoint): Reimplement.
7702 (find_breakpoint_at): Delete.
7703 (find_gdb_breakpoint_at): New.
7704 (delete_breakpoint_at): Delete.
7705 (set_gdb_breakpoint_at): New.
7706 (delete_gdb_breakpoint_at): New.
7707 (gdb_breakpoint_here): New.
7708 (set_reinsert_breakpoint): Use release_breakpoint.
7709 (uninsert_breakpoint): Rename to ...
7710 (uninsert_raw_breakpoint): ... this.
7711 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7712 (reinsert_raw_breakpoint): Change parameter type to
7713 raw_breakpoint.
7714 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7715 instead.
7716 (check_breakpoints): Adjust. Use release_breakpoint.
7717 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7718 (breakpoint_inserted_here): Ditto.
7719 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7720 Don't trust the breakpoint's shadow if it is not inserted.
7721 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7722 (delete_all_breakpoints): Adjust.
7723 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7724 use delete_breakpoint_1.
7725
7726 * mem-break.h (breakpoints_supported): Delete declaration.
7727 (set_gdb_breakpoint_at): Declare.
7728 (gdb_breakpoint_here): Declare.
7729 (delete_breakpoint_at): Delete.
7730 (delete_gdb_breakpoint_at): Declare.
7731
7732 * server.h (struct raw_breakpoint): Forward declare.
7733 (struct process_info): New field `raw_breakpoints'.
7734
7735 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7736 breakpoints.
7737
6bf5e0ba
PA
77382010-03-24 Pedro Alves <pedro@codesourcery.com>
7739
7740 * linux-low.c (status_pending_p_callback): Fix comment.
7741 (linux_wait_for_event_1): Move most of the internal breakpoint
7742 handling from here...
7743 (linux_wait_1): ... to here.
7744 (count_events_callback): New.
7745 (select_singlestep_lwp_callback): New.
7746 (select_event_lwp_callback): New.
7747 (cancel_breakpoints_callback): New.
7748 (select_event_lwp): New.
7749 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7750 priority to all LWPs that have had events that should be reported
7751 to the client. Cancel breakpoints when about to reporting the
7752 event to the client, not while stopping lwps. No longer cancel
7753 finished single-steps here.
7754 (cancel_finished_single_step): Delete.
7755 (cancel_finished_single_steps): Delete.
7756
414a389f
PA
77572010-03-24 Pedro Alves <pedro@codesourcery.com>
7758
7759 * mem-break.c (enum bkpt_type): New.
7760 (struct breakpoint): New field `type'.
7761 (set_breakpoint_at): Change return type to struct breakpoint
7762 pointer. Set type to `other_breakpoint' by default.
7763 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7764 in the breakpoint list.
7765 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7766 (reinsert_breakpoint): Rename to ...
7767 (reinsert_raw_breakpoint): ... this.
7768 (reinsert_breakpoints_at): Adjust.
7769 * mem-break.h (struct breakpoint): Declare.
7770 (set_breakpoint_at): Change return type to struct breakpoint
7771 pointer.
7772
2280c721
PA
77732010-03-24 Pedro Alves <pedro@codesourcery.com>
7774
7775 * server.c (handle_query): Assign, not compare.
7776
d50171e4
PA
77772010-03-24 Pedro Alves <pedro@codesourcery.com>
7778
7779 Teach linux gdbserver to step-over-breakpoints.
7780
7781 * linux-low.c (can_hardware_single_step): New.
7782 (supports_breakpoints): New.
7783 (handle_extended_wait): If stopping threads, read the stop pc of
7784 the new cloned LWP.
7785 (get_pc): New.
7786 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7787 low target doesn't support retrieving the PC.
7788 (add_lwp): Set last_resume_kind to resume_continue.
7789 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7790 (linux_attach): Don't clear stop_expected. Set the lwp's
7791 last_resume_kind to resume_stop.
7792 (linux_detach_one_lwp): Don't check for removed breakpoints.
7793 (check_removed_breakpoint): Delete.
7794 (status_pending_p): Rename to ...
7795 (status_pending_p_callback): ... this. Don't check for removed
7796 breakpoints. Don't consider threads that are stopped from GDB's
7797 perspective.
7798 (linux_wait_for_lwp): Always read the stop_pc here.
7799 (cancel_breakpoint): New.
7800 (step_over_bkpt): New global.
7801 (linux_wait_for_event_1): Implement stepping over breakpoints.
7802 (gdb_wants_lwp_stopped): New.
7803 (gdb_wants_all_stopped): New.
7804 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7805 single-step traps here. Store the thread's last reported target
7806 wait status.
7807 (send_sigstop): Don't clear stop_expected. Always set it,
7808 instead.
7809 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7810 (cancel_finished_single_step): New.
7811 (cancel_finished_single_steps): New.
7812 (wait_for_sigstop): Don't cancel finished single-step traps here.
7813 (linux_resume_one_lwp): Don't check for removed breakpoints.
7814 Don't set `step' on non-hardware step archs.
7815 (linux_set_resume_request): Ignore resume_stop requests if already
7816 stopping or stopped. Set the lwp's last_resume_kind.
7817 (resume_status_pending_p): Don't check for removed breakpoints.
7818 (need_step_over_p): New.
7819 (start_step_over): New.
7820 (finish_step_over): New.
7821 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7822 requests. Clear the thread's last reported target waitstatus.
7823 Don't use the `suspended' flag. Don't consider pending breakpoints.
7824 (linux_resume): Start a step-over if necessary.
7825 (proceed_one_lwp): New.
7826 (proceed_all_lwps): New.
7827 (unstop_all_lwps): New.
7828 * linux-low.h (struct lwp_info): Rewrite comment for the
7829 `suspended' flag. Add the `stop_pc' field. Delete the
7830 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7831 Add `'last_resume_kind' and `need_step_over' fields.
7832 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7833 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7834 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7835 (set_raw_breakpoint_at): New.
7836 (set_breakpoint_at): Rewrite to use it.
7837 (reinsert_breakpoint_handler): Delete.
7838 (set_reinsert_breakpoint): New.
7839 (reinsert_breakpoint_by_bp): Delete.
7840 (delete_reinsert_breakpoints): New.
7841 (uninsert_breakpoint): Rewrite.
7842 (uninsert_breakpoints_at): New.
7843 (reinsert_breakpoint): Rewrite.
7844 (reinsert_breakpoints_at): New.
7845 (check_breakpoints): Rewrite.
7846 (breakpoint_here): New.
7847 (breakpoint_inserted_here): New.
7848 (check_mem_read): Adjust.
7849 * mem-break.h (breakpoints_supported, breakpoint_here)
7850 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7851 (reinsert_breakpoint_by_bp): Delete declaration.
7852 (delete_reinsert_breakpoints): Declare.
7853 (reinsert_breakpoint): Delete declaration.
7854 (reinsert_breakpoints_at): Declare.
7855 (uninsert_breakpoint): Delete declaration.
7856 (uninsert_breakpoints_at): Declare.
7857 (check_breakpoints): Adjust prototype.
7858 * server.h: Adjust include order.
7859 (struct thread_info): Declare here. Add a `last_status' field.
7860
30ba68cb
MS
78612010-03-23 Michael Snyder <msnyder@vmware.com>
7862
7863 * server.c (crc32): New function.
7864 (handle_query): Add handling for 'qCRC:' request.
7865
b9a881c2
PA
78662010-03-23 Pedro Alves <pedro@codesourcery.com>
7867
7868 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7869 lwp had been stopped by a watchpoint.
7870
e92d13d5
PA
78712010-03-16 Pedro Alves <pedro@codesourcery.com>
7872
7873 * server.h (internal_error): Declare.
7874 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7875 * utils.c (internal_error): New function.
7876
64daa791
AS
78772010-03-15 Andreas Schwab <schwab@redhat.com>
7878
7879 * configure.srv: Fix typo setting srv_regobj.
7880
f52cd8cd
PA
78812010-03-15 Pedro Alves <pedro@codesourcery.com>
7882
7883 * linux-low.c (fetch_register): Avoid passing a non string literal
7884 format to `error'.
7885 (usr_store_inferior_registers): Ditto.
7886
93ae6fdc
PA
78872010-03-14 Pedro Alves <pedro@codesourcery.com>
7888
7889 * linux-low.c (linux_write_memory): Bail out early if peeking
7890 memory failed.
7891
c3adc08c
PA
78922010-03-14 Pedro Alves <pedro@codesourcery.com>
7893
7894 * linux-low.h (struct lwp_info): New fields
7895 `stopped_by_watchpoint' and `stopped_data_address'.
7896 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7897 here, and cache them in the lwp object.
7898 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7899 directly.
7900 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7901 field.
7902 (linux_stopped_by_watchpoint): Rewrite.
7903 (linux_stopped_data_address): Rewrite.
7904
bce522a2
PA
79052010-03-06 Simo Melenius <simo.melenius@iki.fi>
7906
7907 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7908 switching the current inferior, not before.
7909
90884b2b
L
79102010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7911
7912 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7913 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7914 i386-linux.c and amd64-linux.c.
7915 (reg-i386.o): Removed.
7916 (reg-i386.c): Likewise.
7917 (reg-i386-linux.o): Likewise.
7918 (reg-i386-linux.c): Likewise.
7919 (reg-x86-64.o): Likewise.
7920 (reg-x86-64.c): Likewise.
7921 (reg-x86-64-linux.o): Likewise.
7922 (reg-x86-64-linux.c): Likewise.
7923 (i386.o): New.
7924 (i386.c): Likewise.
7925 (i386-linux.o): Likewise.
7926 (i386-linux.c): Likewise.
7927 (amd64.o): Likewise.
7928 (amd64.c): Likewise.
7929 (amd64-linux.o): Likewise.
7930 (amd64-linux.c): Likewise.
7931
7932 * configure.srv (srv_i386_regobj): New.
7933 (srv_i386_linux_regobj): Likewise.
7934 (srv_amd64_regobj): Likewise.
7935 (srv_amd64_linux_regobj): Likewise.
7936 (srv_i386_32bit_xmlfiles): Likewise.
7937 (srv_i386_64bit_xmlfiles): Likewise.
7938 (srv_i386_xmlfiles): Likewise.
7939 (srv_amd64_xmlfiles): Likewise.
7940 (srv_i386_linux_xmlfiles): Likewise.
7941 (srv_amd64_linux_xmlfiles): Likewise.
7942 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7943 srv_xmlfiles to $srv_i386_xmlfiles.
7944 (i[34567]86-*-mingw32ce*): Likewise.
7945 (i[34567]86-*-mingw*): Likewise.
7946 (i[34567]86-*-nto*): Likewise.
7947 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7948 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7949 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7950 (x86_64-*-linux*): Likewise.
7951
7952 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7953 (init_registers_amd64_linux): New.
7954 (x86_arch_setup): Replace init_registers_x86_64_linux with
7955 init_registers_amd64_linux.
7956
193f13e6
MK
79572010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7958
7959 * configure.ac: Check for libdl. If it is not available link against
7960 static libthread_db.
7961 * configure: Regenerate.
7962
85d721b8
PA
79632010-02-22 Pedro Alves <pedro@codesourcery.com>
7964
7965 PR9605
7966
7967 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7968 handing a read watchpoint.
7969 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7970
6076632b
DE
79712010-02-12 Doug Evans <dje@google.com>
7972
7973 * linux-low.c (linux_supports_tracefork_flag): Document.
7974 (linux_look_up_symbols): Add comment.
7975
3327ccf7
L
79762010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7977
7978 * regcache.c (supply_register): Clear regcache if buf is NULL.
7979
0718675c 79802010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7981 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7982
7983 * inferiors.c (find_inferior): Add function documentation.
7984 (unloaded_dll): Handle the case where the unloaded dll has not
7985 been previously registered in the dll list.
7986
177321bd
DJ
79872010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7988
7989 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7990 (thumb2_breakpoint): New.
7991 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7992
2b009048
DJ
79932010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7994
7995 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7996 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7997 breakpoints.
7998
3be029c7
PA
79992010-01-21 Pedro Alves <pedro@codesourcery.com>
8000
8001 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8002
18f5de3b
JK
80032010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8004
8005 * linux-s390-low.c (s390_collect_ptrace_register)
8006 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8007
3743bb4f
DE
80082010-01-21 Doug Evans <dje@google.com>
8009
14ce3065
DE
8010 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8011 (PTRACE_ARG4_TYPE): New macro.
8012 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8013 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8014 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8015 (usr_store_inferior_registers): Ditto.
8016 (linux_read_memory, linux_write_memory): Ditto.
8017 (linux_test_for_tracefork): Ditto.
8018
3743bb4f
DE
8019 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8020 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8021
8b315be5
PA
80222010-01-21 Pedro Alves <pedro@codesourcery.com>
8023
8024 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8025 target.
8026
85492558
PA
80272010-01-21 Pedro Alves <pedro@codesourcery.com>
8028
8029 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8030 prototype to take a regcache. Adjust.
8031
442ea881
PA
80322010-01-20 Pedro Alves <pedro@codesourcery.com>
8033
8034 * regcache.h (struct thread_info): Forward declare.
8035 (struct regcache): New.
8036 (new_register_cache): Adjust prototype.
8037 (get_thread_regcache): Declare.
8038 (free_register_cache): Adjust prototype.
8039 (registers_to_string, registers_from_string): Ditto.
8040 (supply_register, supply_register_by_name, collect_register)
8041 (collect_register_as_string, collect_register_by_name): Ditto.
8042 * regcache.c (struct inferior_regcache_data): Delete.
8043 (get_regcache): Rename to ...
8044 (get_thread_regcache): ... this. Adjust. Switch inferior before
8045 fetching registers.
8046 (regcache_invalidate_one): Adjust.
8047 (regcache_invalidate): Fix prototype.
8048 (new_register_cache): Return the new register cache.
8049 (free_register_cache): Change prototype.
8050 (realloc_register_cache): Adjust.
8051 (registers_to_string): Change prototype to take a regcache. Adjust.
8052 (registers_from_string): Ditto.
8053 (register_data): Ditto.
8054 (supply_register): Ditto.
8055 (supply_register_by_name): Ditto.
8056 (collect_register): Ditto.
8057 (collect_register_as_string): Ditto.
8058 (collect_register_by_name): Ditto.
8059 * server.c (process_serial_event): Adjust.
8060 * linux-low.h (regset_fill_func, regset_store_func): Change
8061 prototype.
8062 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8063 Change prototype.
8064 * linux-low.c (get_stop_pc): Adjust.
8065 (check_removed_breakpoint): Adjust.
8066 (linux_wait_for_event): Adjust.
8067 (linux_resume_one_lwp): Adjust.
8068 (fetch_register): Add regcache parameter. Adjust.
8069 (usr_store_inferior_registers): Ditto.
8070 (regsets_fetch_inferior_registers): Ditto.
8071 (regsets_store_inferior_registers): Ditto.
8072 (linux_fetch_registers, linux_store_registers): Ditto.
8073 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8074 regcache. Adjust.
43aaf8b6
PA
8075 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8076 Ditto.
442ea881
PA
8077 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8078 prototype to take a regcache.
8079 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8080 * remote-utils.c (convert_ascii_to_int, outreg)
8081 (prepare_resume_reply): Change prototype to take a regcache.
8082 Adjust.
8083 * target.h (struct target_ops) <fetch_registers, store_registers>:
8084 Change prototype to take a regcache.
8085 (fetch_inferior_registers, store_inferior_registers): Change
8086 prototype to take a regcache. Adjust.
8087 * proc-service.c (ps_lgetregs): Adjust.
8088 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8089 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8090 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8091 take a regcache. Adjust.
8092 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8093 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8094 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8095 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8096 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8097 (cris_cannot_fetch_register):
8098 (cris_breakpoint_at): Change prototype to take a regcache.
8099 Adjust.
8100 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8101 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8102 to take a regcache. Adjust.
8103 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8104 Adjust.
8105 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8106 take a regcache. Adjust.
8107 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8108 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8109 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8110 * linux-mips-low.c (mips_get_pc):
8111 (mips_set_pc): Change prototype to take a regcache. Adjust.
8112 (mips_reinsert_addr): Adjust.
8113 (mips_collect_register): Change prototype to take a regcache.
8114 Adjust.
8115 (mips_supply_register):
8116 (mips_collect_register_32bit, mips_supply_register_32bit)
8117 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8118 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8119 * linux-ppc-low.c (ppc_supply_ptrace_register)
8120 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8121 (parse_spufs_run): Adjust.
8122 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8123 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8124 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8125 take a regcache. Adjust.
8126 * linux-s390-low.c (s390_collect_ptrace_register)
8127 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8128 (s390_set_pc): Change prototype to take a regcache. Adjust.
8129 (s390_arch_setup): Adjust.
8130 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8131 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8132 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8133 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8134 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8135 regcache. Adjust.
8136 (sparc_breakpoint_at): Adjust.
8137 * linux-xtensa-low.c (xtensa_fill_gregset):
8138 (xtensa_store_gregset):
8139 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8140 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8141 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8142 prototype to take a regcache. Adjust.
8143 * win32-arm-low.c (arm_fetch_inferior_register)
8144 (arm_store_inferior_register): Change prototype to take a
8145 regcache. Adjust.
8146 * win32-i386-low.c (i386_fetch_inferior_register)
8147 (i386_store_inferior_register): Change prototype to take a
8148 regcache. Adjust.
8149 * win32-low.c (child_fetch_inferior_registers)
8150 (child_store_inferior_registers): Change prototype to take a
8151 regcache. Adjust.
8152 (win32_wait): Adjust.
8153 (win32_fetch_inferior_registers): Change prototype to take a
8154 regcache. Adjust.
8155 (win32_store_inferior_registers): Adjust.
8156 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8157 store_inferior_register>: Change prototype to take a regcache.
8158
60c3d7b0
DE
81592010-01-20 Doug Evans <dje@google.com>
8160
8161 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8162 #ifdef.
8163 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8164 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8165
dc146f7c
VP
81662010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8167
8168 * linux-low.c (linux_core_of_thread): New.
8169 (compare_ints, show_process, list_threads): New.
8170 (linux_qxfer_osdata): Report threads and cores.
8171 (linux_target_op): Register linux_core_of_thread.
8172 * remote-utils.c (prepare_resume_reply): Report the core.
8173 (buffer_xml_printf): Support %d specifier.
8174 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8175 New.
8176 (handle_query): Handle qXfer:threads. Announce availability
8177 thereof.
8178 * target.h (struct target_ops): New field core_of_thread.
8179
7803799a
UW
81802010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8181
8182 * Makefile.in (clean): Remove new generated files.
8183 (reg-s390.o, reg-s390.c): Remove rules.
8184 (reg-s390x.o, reg-s390x.c): Likewise.
8185 (s390-linux32.o, s390-linux32.c): Add rules.
8186 (s390-linux64.o, s390-linux64.c): Likewise.
8187 (s390x-linux64.o, s390x-linux64.c): Likewise.
8188 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8189 * linux-s390-low.c: Include <elf.h>.
8190 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8191 (init_registers_s390): Remove prototype.
8192 (init_registers_s390x): Likewise.
8193 (init_registers_s390_linux32): Add prototype.
8194 (init_registers_s390_linux64): Likewise.
8195 (init_registers_s390x_linux64): Likewise.
8196 (s390_num_regs_3264): New define.
8197 (s390_regmap_3264): New global variable.
8198 (s390_cannot_fetch_register): Remove obsolete check.
8199 (s390_cannot_store_register): Likewise.
8200 (s390_collect_ptrace_register): Handle upper/lower register halves.
8201 (s390_supply_ptrace_register): Likewise.
8202 (s390_fill_gregset): Update to register number changes.
8203 (s390_get_hwcap): New routine.
8204 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8205 Install appropriate regmap and register set.
8206
6e7ffa39
JB
82072010-01-01 Joel Brobecker <brobecker@adacore.com>
8208
8209 * server.c (gdbserver_version): Update copyright year to 2010.
8210 * gdbreplay.c (gdbreplay_version): Likewise.
8211
957f3f49
DE
82122009-12-28 Doug Evans <dje@google.com>
8213
8214 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8215 elf/external.h. Include <elf.h> instead but only if necessary.
8216
ca5c370d
PA
82172009-12-28 Pedro Alves <pedro@codesourcery.com>
8218
8219 * linux-low.c (linux_remove_process): Remove `detaching'
8220 parameter. Don't release/detach from thread_db here.
8221 (linux_kill): Release/detach from thread_db here, ...
8222 (linux_detach): ... and here, before actually detaching.
8223 (linux_wait_1): ... and here, when a process exits.
8224 * thread-db.c (any_thread_of): New.
8225 (thread_db_free): Switch the current inferior to a thread of the
8226 passed in process.
8227
4ee62156
DE
82282009-12-21 Doug Evans <dje@google.com>
8229
d90e6a88
DE
8230 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8231
c5f62d5f
DE
8232 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8233 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8234 warning ifndef __NR_tkill. Move setting of errno there too.
8235 Delete unnecessary resetting of errno after syscall.
8236 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8237
10e86dd7
DE
8238 * configure.ac: Check for dladdr.
8239 * config.in: Regenerate.
8240 * configure: Regenerate.
8241 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8242 (try_thread_db_load): Update.
8243
4ee62156
DE
8244 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8245
00f515da
DE
82462009-12-18 Doug Evans <dje@google.com>
8247
e9464885
DE
8248 * event-loop.c: Include unistd.h if it exists.
8249
07d4f67e
DE
8250 * linux-low.c (my_waitpid): Move definition away from being in
8251 between linux_tracefork_child/linux_test_for_tracefork.
8252
00f515da
DE
8253 * gdb_proc_service.h (psaddr_t): Fix type.
8254 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8255 signature to match glibc.
8256
1de1badb
DE
82572009-12-16 Doug Evans <dje@google.com>
8258
8259 * linux-low.c (linux_read_memory): Fix argument to read.
8260
aeeb81d1
PA
82612009-11-26 Pedro Alves <pedro@codesourcery.com>
8262
8263 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8264 events, don't leave current_inferior pointing at null.
8265
10357975
PA
82662009-11-26 Pedro Alves <pedro@codesourcery.com>
8267
8268 * win32-low.c (LOG): Delete.
8269 (OUTMSG): Output to stderr.
8270 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8271 on compile time LOG macro.
8272 (win32_wait): Fix debug output.
8273
cf6e3471
PA
82742009-11-26 Pedro Alves <pedro@codesourcery.com>
8275
8276 * win32-low.c (win32_add_one_solib): If the dll name is
8277 "ntdll.dll", prepend the system directory to the dll path.
8278
0c85e18e
MK
82792009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8280
8281 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8282
9ac544ce 82832009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8284 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8285
8286 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8287 * configure.ac: Check for __mcoldfire__ and set
8288 gdb_cv_m68k_is_coldfire.
8289 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8290 reg-cf.o and reg-m68k.o.
8291 * configure: Regenerated.
8292
fd7dd3e6
PA
82932009-11-16 Pedro Alves <pedro@codesourcery.com>
8294
8295 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8296 Pass it to thread_db_free.
8297 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8298 proper `detaching' argument to linux_remove_process.
8299 * linux-low.h (thread_db_free): Add `detaching' parameter.
8300 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8301 to thread_db_free.
8302 (thread_db_free): Add `detaching' parameter. Only
8303 call td_ta_clear_event if detaching from process.
8304
75aa492e
MK
83052009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8306
8307 * thread-db.c (thread_db_free): Fix typo.
8308
21e1bee4
PP
83092009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8310
8311 PR gdb/10838
8312 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8313
8838b45e
NS
83142009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8315
8316 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8317 with an i686 compiler.
8318 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8319 needed.
8320 * configure: Rebuilt.
8321
8a35fb51
SL
83222009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8323
8324 PR gdb/10783
8325
8326 * server.c (handle_search_memory_1): Correct read_addr initialization
8327 in loop for searching subsequent chunks.
8328
96f15937
PP
83292009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8330
8331 * configure.ac: New --with-libthread-db option.
8332 * thread-db.c: Allow direct dependence on libthread_db.
8333 (thread_db_free): Adjust.
8334 * config.in: Regenerate.
8335 * configure: Likewise.
889bf7c5 8336
5f7d1694
PP
83372009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8338
8339 PR gdb/10757
8340 * thread-db.c (attach_thread): New function.
8341 (maybe_attach_thread): Return success/failure.
8342 (find_new_threads_callback): Adjust.
889bf7c5
PA
8343 (thread_db_find_new_threads): Loop until no new threads.
8344
88e3b899
PA
83452009-10-13 Pedro Alves <pedro@codesourcery.com>
8346
8347 * proc-service.c (ps_lgetregs): Formatting.
8348
cdbfd419
PP
83492009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8350
8351 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8352 * configure.ac: Adjust.
8353 * linux-low.h (struct process_info_private): Move members to struct
8354 thread_db.
8355 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8356 * linux-low.c (linux_remove_process): Adjust.
8357 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8358 * server.c (handle_query): Move code ...
8359 (handle_monitor_command): ... here. New function.
8360 * target.h (struct target_ops): New member.
8361 * thread-db.c (struct thread_db): New.
8362 (libthread_db_search_path): New variable.
8363 (thread_db_create_event, thread_db_enable_reporting)
8364 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8365 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8366 (try_thread_db_load_1, dladdr_to_soname): New functions.
8367 (try_thread_db_load, thread_db_load_search): New functions.
8368 (thread_db_init): Search for libthread_db.
8369 (thread_db_free): New function.
8370 (thread_db_handle_monitor_command): Likewise.
8371 * config.in: Regenerate.
8372 * configure: Regenerate.
889bf7c5 8373
4168d2d6
UW
83742009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8375
8376 * spu-low.c (spu_kill): Wait for inferior to terminate.
8377 Call clear_inferiors.
8378 (spu_detach): Call clear_inferiors.
8379
81ecdfbb
RW
83802009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8381
8382 * aclocal.m4: Regenerate.
8383 * config.in: Likewise.
8384 * configure: Likewise.
8385
0b9ff2c0
UW
83862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8387
8388 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8389 (parse_spufs_run): New function.
8390 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8391 (ppc_breakpoint_at): Handle SPU breakpoints.
8392
efcbbd14
UW
83932009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8394
8395 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8396 (SPUFS_MAGIC): Define.
8397 (spu_enumerate_spu_ids): New function.
8398 (linux_qxfer_spu): New function.
8399 (linux_target_ops): Install linux_qxfer_spu.
8400
f4d9bade
UW
84012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8402
8403 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8404 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8405 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8406 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8407 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8408 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8409 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8410 (init_registers_powerpc_cell32l): Add prototype.
8411 (init_registers_powerpc_cell64l): Likewise.
8412 (ppc_arch_setup): Detect Cell/B.E. architecture.
8413
96e946ca
RW
84142009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8415
8416 * Makefile.in (datarootdir): New variable.
8417
58d6951d
DJ
84182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8419
8420 * linux-low.c (linux_write_memory): Update debugging output.
8421 * Makefile.in (clean): Add new descriptions.
8422 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8423 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8424 * configure.srv: Add new files for arm*-*-linux*.
8425 * linux-arm-low.c: Add new declarations.
8426 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8427 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8428 (HWCAP_VFPv3D16): New.
8429 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8430 instead of __IWMMXT__.
8431 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8432 (arm_arch_setup): New.
8433 (target_regsets): Remove #ifdef. Add VFP regset.
8434 (the_low_target): Use arm_arch_setup.
8435
12b42a12
DJ
84362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8437
8438 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8439 the main thread again.
8440
ac8c974e
AR
84412009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8442
8443 Adding Neutrino gdbserver.
8444 * configure: Regenerated.
8445 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8446 * configure.srv (i[34567]86-*-nto*): New target.
8447 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8448 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8449 (nto_comctrl) [__QNX__]: New function.
8450 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8451
4424e0c3 84522009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8453
8454 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8455 srv_tgtobj.
8456
912cf4ba
PA
84572009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8458 Pedro Alves <pedro@codesourcery.com>
8459
8460 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8461 don't support CONTEXT_EXTENDED_REGISTERS.
8462 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8463 (the_low_target): Install them.
8464 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8465 failing with ERROR_PIPE_NOT_CONNECTED.
8466
aa5ca48f
DE
84672009-06-30 Doug Evans <dje@google.com>
8468 Pierre Muller <muller@ics.u-strasbg.fr>
8469
8470 Add h/w watchpoint support to x86-linux, win32-i386.
8471 * Makefile.in (SFILES): Add i386-low.c
8472 (i386_low_h): Define.
8473 (i386-low.o): Add dependencies.
8474 (linux-x86-low.o): Add i386-low.h dependency.
8475 (win32-i386-low.o): Ditto.
8476 * i386-low.c: New file.
8477 * i386-low.h: New file.
8478 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8479 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8480 * linux-low.c (linux_add_process): Initialize arch_private.
8481 (linux_remove_process): Free arch_private.
8482 (add_lwp): Initialize arch_private.
8483 (delete_lwp): Free arch_private.
8484 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8485 provided.
8486 * linux-low.h (process_info_private): New member arch_private.
8487 (lwp_info): New member arch_private.
8488 (linux_target_ops): New members new_process, new_thread,
8489 prepare_to_resume.
8490 (ptid_of): New macro.
8491 * linux-x86-low.c: Include stddef.h, i386-low.h.
8492 (arch_process_info): New struct.
8493 (arch_lwp_info): New struct.
8494 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8495 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8496 (i386_dr_low_get_status): New function.
8497 (x86_insert_point, x86_remove_point): New functions.
8498 (x86_stopped_by_watchpoint): New function.
8499 (x86_stopped_data_address): New function.
8500 (x86_linux_new_process, x86_linux_new_thread): New functions.
8501 (x86_linux_prepare_to_resume): New function.
8502 (the_low_target): Add entries for insert_point, remove_point,
8503 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8504 prepare_to_resume.
8505 * server.c (debug_hw_points): New global.
8506 (monitor_show_help): Document set debug-hw-points.
8507 (handle_query): Process "set debug-hw-points".
8508 * server.h (debug_hw_points): Declare.
8509 (paddress): Declare.
8510 * utils.c (NUMCELLS, CELLSIZE): New macros.
8511 (get_sell, xsnprintf, paddress): New functions.
8512 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8513 remove_point, stopped_by_watchpoint, stopped_data_address.
8514 * win32-i386-low.c: Include i386-low.h.
8515 (debug_reg_state): Replaces dr.
8516 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8517 (i386_dr_low_get_status): New function.
8518 (i386_insert_point, i386_remove_point): New functions.
8519 (i386_stopped_by_watchpoint): New function.
8520 (i386_stopped_data_address): New function.
8521 (i386_initial_stuff): Update.
8522 (get_thread_context,set_thread_context,i386_thread_added): Update.
8523 (the_low_target): Add entries for insert_point,
8524 remove_point, stopped_by_watchpoint, stopped_data_address.
8525 * win32-low.c (win32_insert_watchpoint): New function.
8526 (win32_remove_watchpoint): New function.
8527 (win32_stopped_by_watchpoint): New function.
8528 (win32_stopped_data_address): New function.
8529 (win32_target_ops): Add entries for insert_watchpoint,
8530 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8531 * win32-low.h (win32_target_ops): New members insert_point,
8532 remove_point, stopped_by_watchpoint, stopped_data_address.
8533
d993e290
PA
85342009-06-25 Pedro Alves <pedro@codesourcery.com>
8535
8536 * server.c (process_serial_event): Re-return unsupported, not
8537 error, if the type isn't recognized. Re-allow supporting only
8538 insert or remove packets. Also call require_running for
8539 breakpoints. Add missing break statement to default case. Tidy.
8540 * target.h (struct target_ops): Rename insert_watchpoint to
8541 insert_point, and remove_watchpoint to remove_point.
8542
8543 * linux-low.h (struct linux_target_ops): Likewise.
8544 * linux-low.c (linux_insert_watchpoint): Rename to ...
8545 (linux_insert_point): ... this. Adjust.
8546 (linux_remove_watchpoint): Rename to ...
8547 (linux_remove_point): ... this. Adjust.
8548 (linux_target_ops): Adjust.
8549 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8550 (cris_insert_point): ... this.
8551 (cris_remove_watchpoint): Rename to ...
8552 (cris_remove_point): ... this.
8553 (the_low_target): Adjust.
8554
0f54c268
PM
85552009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8556
8557 * server.c (handle_v_kill): Pass signal_pid to
8558 kill_inferior if multi_process is zero.
8559
c6314022
AR
85602009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8561
8562 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8563 * target.h (target_ops): Comment for *_watchpoint to make it clear
8564 the functions can get types '0' and '1'.
8565
4463ce24
AR
85662009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8567
8568 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8569 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8570 * regcache.c (get_regcache): Likewise.
8571 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8572 * win32-low.c (child_fetch_inferior_registers): Remove check for
8573 regno 0.
8574
cf8fd78b
PA
85752009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8576 Pedro Alves <pedro@codesourcery.com>
8577
8578 * target.h (struct target_ops) <supports_multi_process>: New
8579 callback.
8580 (target_supports_multi_process): New.
8581 * server.c (handle_query): Even if GDB reports support, only
8582 enable multi-process if the target also supports it. Report
8583 multi-process support only if the target backend supports it.
8584 * linux-low.c (linux_supports_multi_process): New function.
8585 (linux_target_ops): Install it as target_supports_multi_process
8586 callback.
8587
47c0c975
DE
85882009-05-24 Doug Evans <dje@google.com>
8589
e09875d4
DE
8590 Global renaming of find_thread_pid to find_thread_ptid.
8591 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8592 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8593 All callers updated.
8594
e27d73f6
DE
8595 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8596 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8597 directly.
8598
47c0c975
DE
8599 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8600 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8601 (linux_resume_one_lwp): Ditto.
8602
2acc282a
DE
86032009-05-23 Doug Evans <dje@google.com>
8604
8605 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8606 from struct inferior_list_entry * to struct lwp_info *.
8607 All callers updated.
8608
9f1036c1
DE
86092009-05-13 Doug Evans <dje@google.com>
8610
8611 * linux-x86-low.c: Don't include assert.h.
8612 (x86_siginfo_fixup): Use fatal, not assert.
8613 (x86_arch_setup): Fix comment.
8614
d0722149
DE
86152009-05-12 Doug Evans <dje@google.com>
8616
8617 Biarch support for i386/amd64 gdbserver.
8618 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8619 Add linux-x86-low.c.
8620 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8621 (linux-x86-low.o): Add.
8622 * linux-x86-64-low.c: Delete.
8623 * linux-i386-low.c: Delete.
8624 * linux-x86-low.c: New file.
8625 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8626 linux-x86-low.o.
8627 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8628 linux-x86-low.o.
8629 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8630 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8631 (linux_child_pid_to_exec_file): New function.
8632 (elf_64_header_p, elf_64_file_p): New functions.
8633 (siginfo_fixup): New function.
8634 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8635 give target a chance to convert layout.
8636 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8637 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8638
fdeb2a12
DE
86392009-05-07 Doug Evans <dje@google.com>
8640
8641 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8642 (regsets_store_inferior_registers): Ditto.
8643
a6dbe5df
PA
86442009-05-06 Pedro Alves <pedro@codesourcery.com>
8645
8646 PR server/10048
8647
8648 * linux-low.c (must_set_ptrace_flags): Delete.
8649 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8650 of the global.
8651 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8652 `lwp->must_set_ptrace_flags' instead.
ba42693b 8653 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8654 (linux_wait_1): ... not here.
8655
5091eb23
DE
86562009-04-30 Doug Evans <dje@google.com>
8657
9f767825
DE
8658 * inferiors.c (started_inferior_callback): New function.
8659 (attached_inferior_callback): New function.
8660 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8661 * server.c (print_started_pid, print_attached_pid): New functions.
8662 (detach_or_kill_for_exit): New function.
8663 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8664 * server.h (have_started_inferiors_p): Declare.
8665 (have_attached_inferiors_p): Declare.
8666
5091eb23
DE
8667 * inferiors.c (remove_process): Fix memory leak, free process.
8668 * linux-low.c (linux_remove_process): New function.
8669 (linux_kill): Call it instead of remove_process.
8670 (linux_detach, linux_wait_1): Ditto.
8671
155c8968
PA
86722009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8673
8674 * configure.srv: Add x86 Windows CE target.
8675
7fe519cb
UW
86762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8677
8678 * inferiors.c (get_thread_process): Make global.
8679 * server.h (get_thread_process): Add prototype.
8680 * thread-db.c (find_one_thread): Use get_thread_process
8681 instead of current_process.
8682 (thread_db_get_tls_address): Do not crash if called when
8683 thread layer is not yet initialized.
8684
5472f405
UW
86852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8686
8687 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8688 * spu-low.c (current_tid): Rename to ...
8689 (current_ptid): ... this.
8690 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8691 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8692 ptid_get_lwp (current_ptid) instead of current_tid.
8693 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8694 instead of current_tid. Use find_process_pid to verify pid
8695 argument is valid. Pass proper argument to remove_process.
8696 (spu_thread_alive): Compare current_ptid instead of current_tid.
8697 (spu_resume): Likewise.
8698
55ac2b99
PA
86992009-04-02 Pedro Alves <pedro@codesourcery.com>
8700
8701 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8702 variable.
8703
95954743
PA
87042009-04-01 Pedro Alves <pedro@codesourcery.com>
8705
8706 Implement the multiprocess extensions, and add linux multiprocess
8707 support.
8708
8709 * server.h (ULONGEST): Declare.
8710 (struct ptid, ptid_t): New.
8711 (minus_one_ptid, null_ptid): Declare.
8712 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8713 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8714 (struct inferior_list_entry): Change `id' type from unsigned from
8715 to ptid_t.
8716 (struct sym_cache, struct breakpoint, struct
8717 process_info_private): Forward declare.
8718 (struct process_info): Declare.
8719 (current_process): Declare.
8720 (all_processes): Declare.
8721 (initialize_inferiors): Declare.
8722 (add_thread): Adjust to use ptid_t.
8723 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8724 (add_process, remove_process, find_thread_pid): Declare.
8725 (find_inferior_id): Adjust to use ptid_t.
8726 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8727 (multi_process): Declare.
8728 (push_event): Adjust to use ptid_t.
8729 (read_ptid, write_ptid): Declare.
8730 (prepare_resume_reply): Adjust to use ptid_t.
8731 (clear_symbol_cache): Declare.
8732 * inferiors.c (all_processes): New.
8733 (null_ptid, minus_one_ptid): New.
8734 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8735 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8736 (add_thread): Change unsigned long to ptid. Remove gdb_id
8737 parameter. Adjust.
8738 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8739 (gdb_id_to_thread): Rename to ...
8740 (find_thread_pid): ... this. Change unsigned long to ptid.
8741 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8742 (loaded_dll, pull_pid_from_list): Adjust.
8743 (add_process, remove_process, find_process_pid)
8744 (get_thread_process, current_process, initialize_inferiors): New.
8745 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8746 (struct target_waitstatus) <related_pid>: Ditto.
8747 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8748 return type to int.
8749 (struct target_ops) <join>: Add `pid' argument.
8750 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8751 (struct target_ops) <wait>: Add `ptid' field. Change return type
8752 to ptid.
8753 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8754 (mywait): Add `ptid' argument. Change return type to ptid_t.
8755 (target_pid_to_str): Declare.
8756 * target.c (set_desired_inferior): Adjust to use ptids.
8757 (mywait): Add new `ptid' argument. Adjust.
8758 (target_pid_to_str): New.
8759 * mem-break.h (free_all_breakpoints): Declare.
8760 * mem-break.c (breakpoints): Delelete.
8761 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8762 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8763 to use per-process breakpoint list.
8764 (free_all_breakpoints): New.
8765 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8766 (symbol_cache, all_symbols_looked_up): Delete.
8767 (hexchars): New.
8768 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8769 read_ptid): New.
8770 (prepare_resume_reply): Change ptid argument's type from unsigned
8771 long to ptid_t. Adjust. Implement W;process and X;process.
8772 (free_sym_cache, clear_symbol_cache): New.
8773 (look_up_one_symbol): Adjust to per-process symbol cache. *
8774 * server.c (cont_thread, general_thread, step_thread): Change type
8775 to ptid_t.
8776 (attached): Delete.
8777 (multi_process): New.
8778 (last_ptid): Change type to ptid_t.
8779 (struct vstop_notif) <ptid>: Change type to ptid_t.
8780 (queue_stop_reply, push_event): Change `ptid' argument's type to
8781 ptid_t.
8782 (discard_queued_stop_replies): Add `pid' argument.
8783 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8784 changes. Don't reference the `attached' global.
8785 (attach_inferior): Adjust to mywait interface changes.
8786 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8787 features. Handle and report "multiprocess+". Handle
8788 "qAttached:PID".
8789 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8790 changes.
8791 (handle_v_kill): New.
8792 (handle_v_stopped): Adjust to use target_pid_to_str.
8793 (handle_v_requests): Allow multiple attaches and runs when
8794 multiprocess extensions are in effect. Handle "vKill".
8795 (myresume): Adjust to use ptids.
8796 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8797 (handle_status): Adjust to discard_queued_stop_replies interface
8798 change.
8799 (first_thread_of, kill_inferior_callback)
8800 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8801 (main): Call initialize_inferiors. Adjust to use ptids, killing
8802 and detaching from all inferiors. Handle multiprocess packet
8803 variants.
8804 * linux-low.h: Include gdb_proc_service.h.
8805 (struct process_info_private): New.
8806 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8807 <lwpid_of>: Use ptid_get_lwp.
8808 (get_lwp_thread): Adjust.
8809 (struct lwp_info): Add `dead' member.
8810 (find_lwp_pid): Declare.
8811 * linux-low.c (thread_db_active): Delete.
8812 (new_inferior): Adjust comment.
8813 (inferior_pid): Delete.
8814 (linux_add_process): New.
8815 (handle_extended_wait): Adjust.
8816 (add_lwp): Change unsigned long to ptid.
8817 (linux_create_inferior): Add process to processes table. Adjust
8818 to use ptids. Don't set new_inferior here.
8819 (linux_attach_lwp): Rename to ...
8820 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8821 it. Adjust to use ptids.
8822 (linux_attach_lwp): New.
8823 (linux_attach): Add process to processes table. Don't set
8824 new_inferior here.
8825 (struct counter): New.
8826 (second_thread_of_pid_p, last_thread_of_process_p): New.
8827 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8828 multiple processes.
8829 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8830 processes. Remove process from process table.
8831 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8832 to multiple processes.
8833 (any_thread_of): New.
8834 (linux_detach): Add `pid' argument, and handle it. Remove process
8835 from processes table.
8836 (linux_join): Add `pid' argument. Handle it.
8837 (linux_thread_alive): Change unsighed long argument to ptid_t.
8838 Consider dead lwps as not being alive.
8839 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8840 threads we're not interested in.
8841 (same_lwp, find_lwp_pid): New.
8842 (linux_wait_for_lwp): Change `pid' argument's type from int to
8843 ptid_t. Adjust.
8844 (linux_wait_for_event): Rename to ...
8845 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8846 from int to ptid_t. Adjust.
8847 (linux_wait_for_event): New.
8848 (linux_wait_1): Add `ptid' argument. Change return type to
8849 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8850 that exit from the process table.
8851 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8852 Adjust.
8853 (mark_lwp_dead): New.
8854 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8855 stopping all threads, mark its main lwp as dead.
8856 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8857 ptids.
8858 (fetch_register, usr_store_inferior_registers)
8859 (regsets_fetch_inferior_registers)
8860 (regsets_store_inferior_registers, linux_read_memory)
8861 (linux_write_memory): Inline `inferior_pid'.
8862 (linux_look_up_symbols): Adjust to use per-process
8863 `thread_db_active'.
8864 (linux_request_interrupt): Adjust to use ptids.
8865 (linux_read_auxv): Inline `inferior_pid'.
8866 (initialize_low): Don't reference thread_db_active.
8867 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8868 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8869 (ps_getpid): Return the pid of the current inferior.
8870 * thread-db.c (proc_handle, thread_agent): Delete.
8871 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8872 per-process data.
8873 (find_one_thread): Change argument type to ptid_t. Adjust to
8874 per-process data.
8875 (maybe_attach_thread): Adjust to per-process data and ptids.
8876 (thread_db_find_new_threads): Ditto.
8877 (thread_db_init): Ditto.
8878 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8879 processes table. Adjust to use ptids.
8880 (spu_kill, spu_detach): Adjust interface. Remove process from
8881 processes table.
8882 (spu_join, spu_thread_alive): Adjust interface.
8883 (spu_wait): Adjust interface. Remove process from processes
8884 table. Adjust to use ptids.
8885 * win32-low.c (current_inferior_tid): Delete.
8886 (current_inferior_ptid): New.
8887 (debug_event_ptid): New.
8888 (thread_rec): Take a ptid. Adjust.
8889 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8890 (child_delete_thread): Ditto.
8891 (do_initial_child_stuff): Add `attached' argument. Add process to
8892 processes table.
8893 (child_fetch_inferior_registers, child_store_inferior_registers):
8894 Adjust.
8895 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8896 (win32_attach): Pass 1 to do_initial_child_stuff.
8897 (win32_kill): Adjust interface. Remove process from processes
8898 table.
8899 (win32_detach): Ditto.
8900 (win32_join): Adjust interface.
8901 (win32_thread_alive): Take a ptid.
8902 (win32_resume): Adjust to use ptids.
8903 (get_child_debug_event): Ditto.
8904 (win32_wait): Adjust interface. Remove exiting process from
8905 processes table.
8906
bd99dc85
PA
89072009-04-01 Pedro Alves <pedro@codesourcery.com>
8908
8909 Non-stop mode support.
8910
8911 * server.h (non_stop): Declare.
8912 (gdb_client_data, handler_func): Declare.
8913 (delete_file_handler, add_file_handler, start_event_loop):
8914 Declare.
8915 (handle_serial_event, handle_target_event, push_event)
8916 (putpkt_notif): Declare.
8917 * target.h (enum resume_kind): New.
8918 (struct thread_resume): Replace `step' field by `kind' field.
8919 (TARGET_WNOHANG): Define.
8920 (struct target_ops) <wait>: Add `options' argument.
8921 <supports_non_stop, async, start_non_stop>: New fields.
8922 (target_supports_non_stop, target_async): New.
8923 (start_non_stop): Declare.
8924 (mywait): Add `options' argument.
8925 * target.c (mywait): Add `options' argument. Print child exit
8926 notifications here.
8927 (start_non_stop): New.
8928 * server.c (non_stop, own_buf, mem_buf): New globals.
8929 (struct vstop_notif): New.
8930 (notif_queue): New global.
8931 (queue_stop_reply, push_event, discard_queued_stop_replies)
8932 (send_next_stop_reply): New.
8933 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8934 interface changes.
8935 (attach_inferior): In non-stop mode, don't wait for the target
8936 here.
8937 (handle_general_set): Handle QNonStop.
8938 (handle_query): When handling qC, return the current general
8939 thread, instead of the first thread of the list.
8940 (handle_query): If the backend supports non-stop mode, include
8941 QNonStop+ in the qSupported query response.
8942 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8943 and non-stop mode.
8944 (handle_v_attach, handle_v_run): Handle non-stop mode.
8945 (handle_v_stopped): New.
8946 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8947 (myresume): Adjust to use resume_kind. Handle non-stop.
8948 (queue_stop_reply_callback): New.
8949 (handle_status): Handle non-stop mode.
8950 (main): Clear non_stop flag on reconnection. Use the event-loop.
8951 Refactor serial protocol handling from here ...
8952 (process_serial_event): ... to this new function. When GDB
8953 selects any thread, select one here. In non-stop mode, wait until
8954 GDB acks all pending events before exiting.
8955 (handle_serial_event, handle_target_event): New.
8956 * remote-utils.c (remote_open): Install remote_desc in the event
8957 loop.
8958 (remote_close): Remove remote_desc from the event loop.
8959 (putpkt_binary): Rename to...
8960 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8961 (putpkt_binary): New as wrapper around putpkt_binary_1.
8962 (putpkt_notif): New.
8963 (prepare_resume_reply): In non-stop mode, don't change the
8964 general_thread.
8965 * event-loop.c: New.
8966 * Makefile.in (OBJ): Add event-loop.o.
8967 (event-loop.o): New rule.
8968
8969 * linux-low.h (pid_of): Moved here.
8970 (lwpid_of): New.
8971 (get_lwp_thread): Use lwpid_of.
8972 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8973 * linux-low.c (pid_of): Delete.
8974 (inferior_pid): Use lwpid_of.
8975 (linux_event_pipe): New.
8976 (target_is_async_p): New.
8977 (delete_lwp): New.
8978 (handle_extended_wait): Use lwpid_of.
8979 (add_lwp): Don't set lwpid field.
8980 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8981 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8982 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8983 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8984 first. Adjust to linux_wait_for_event interface changes. Use
8985 lwpid_of.
8986 (linux_detach): Don't delete the main lwp here.
8987 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8988 (status_pending_p): Don't consider explicitly suspended lwps.
8989 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8990 pointer. Add OPTIONS argument. Change return type to int. Use
8991 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8992 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8993 pointer. Add status pointer argument. Return a pid instead of a
8994 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8995 changes. In non-stop mode, don't switch to a random thread.
8996 (linux_wait): Rename to...
8997 (linux_wait_1): ... this. Add target_options argument, and handle
8998 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8999 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9000 clean exit and signal exit code. Don't stop all threads in
9001 non-stop mode. In all-stop mode, only stop all threads when
9002 reporting a stop to GDB. Handle explicit thread stop requests.
9003 (async_file_flush, async_file_mark): New.
9004 (linux_wait): New.
9005 (send_sigstop): Use lwpid_of.
9006 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9007 interface changes. In non-stop mode, don't switch to a random
9008 thread.
9009 (linux_resume_one_lwp): Use lwpid_of.
9010 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9011 (linux_resume_one_thread): ... this. Handle resume_stop. In
9012 non-stop mode, don't look for pending flag in all threads.
9013 (resume_status_pending_p): Don't consider explicitly suspended
9014 threads.
9015 (my_waitpid): Reimplement. Emulate __WALL.
9016 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9017 Use lwpid_of.
9018 (sigchld_handler, linux_supports_non_stop, linux_async)
9019 (linux_start_non_stop): New.
9020 (linux_target_ops): Register linux_supports_non_stop, linux_async
9021 and linux_start_non_stop.
9022 (initialize_low): Install SIGCHLD handler.
9023 * thread-db.c (thread_db_create_event, find_one_thread)
9024 (thread_db_get_tls_address): Use lwpid_of.
9025 * win32-low.c (win32_detach): Adjust to use resume_kind.
9026 (win32_wait): Add `options' argument.
9027 * spu-low.c (spu_resume): Adjust to use resume_kind.
9028 (spu_wait): Add `options' argument.
9029
5b1c542e
PA
90302009-04-01 Pedro Alves <pedro@codesourcery.com>
9031
9032 Decouple target code from remote protocol.
9033
9034 * target.h (enum target_waitkind): New.
9035 (struct target_waitstatus): New.
9036 (struct target_ops) <wait>: Return an unsigned long. Take a
9037 target_waitstatus pointer instead of a char pointer.
9038 (mywait): Likewise.
9039 * target.c (mywait): Change prototype to return an unsigned long.
9040 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9041 * server.h (thread_from_wait, old_thread_from_wait): Delete
9042 declarations.
9043 (prepare_resume_reply): Change prototype to take a
9044 target_waitstatus.
9045 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9046 (last_status, last_ptid): New.
9047 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9048 pid instead of a signal.
9049 (attach_inferior): Remove "status" and "signal" parameters.
9050 Adjust.
9051 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9052 not as an address.
9053 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9054 (handle_v_requests, myresume): Remove "status" and "signal"
9055 parameters. Adjust.
9056 (handle_status): New.
9057 (main): Delete local `status'. Adjust.
9058 * remote-utils.c: Include target.h.
9059 (prepare_resume_reply): Change prototype to take a
9060 target_waitstatus. Adjust.
9061
9062 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9063 interface.
9064 * spu-low.c (spu_wait): Adjust.
9065 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9066 Delete.
9067 (win32_wait): Adjust.
9068
2bd7c093
PA
90692009-04-01 Pedro Alves <pedro@codesourcery.com>
9070
9071 * target.h (struct thread_resume): Delete leave_stopped member.
9072 (struct target_ops): Add a `n' argument to the `resume' callback.
9073 * server.c (start_inferior): Adjust.
9074 (handle_v_cont, myresume): Adjust.
9075 * linux-low.c (check_removed_breakpoint): Adjust to resume
9076 interface change, and to removed leave_stopped field.
9077 (resume_ptr): Delete.
9078 (struct thread_resume_array): New.
9079 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9080 resume interface change.
9081 (linux_continue_one_thread, linux_queue_one_thread)
9082 (resume_status_pending_p): Check if the resume field is NULL
9083 instead of checking the leave_stopped member.
9084 (linux_resume): Adjust to the target resume interface change.
9085 * spu-low.c (spu_resume): Adjust to the target resume interface
9086 change.
9087 * win32-low.c (win32_detach, win32_resume): Ditto.
9088
c35fafde
PA
90892009-04-01 Pedro Alves <pedro@codesourcery.com>
9090
9091 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9092 flag.
9093 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9094 pending.
9095 (linux_continue_one_thread): Only preserve the stepping flag if
9096 there's a pending breakpoint.
9097
0a59d50b
PA
90982009-03-31 Pedro Alves <pedro@codesourcery.com>
9099
9100 * server.c (main): After the inferior having exited, call
9101 remote_close before exiting gdbserver.
9102
f04c6d38
TJB
91032009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9104
9105 Fix size of FPSCR in Power 7 processors.
9106 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9107 (PPC_FEATURE_HAS_DFP): New #define.
9108 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9109 size of the FPSCR.
9110
78e5cee6
PA
91112009-03-23 Pedro Alves <pedro@codesourcery.com>
9112
9113 * server.c (handle_query) Whitespace and formatting.
9114
1b3f6016
PA
91152009-03-22 Pedro Alves <pedro@codesourcery.com>
9116
9117 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9118 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9119 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9120 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9121 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9122 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9123 Makefile.in, configure.ac: Fix whitespace throughout.
9124 * configure: Regenerate.
9125
a07b2135
PA
91262009-03-22 Pedro Alves <pedro@codesourcery.com>
9127
9128 * inferiors.c (find_inferior): Make it safe for the callback
9129 function to delete the currently iterated inferior.
9130
67cc2626
PA
91312009-03-22 Pedro Alves <pedro@codesourcery.com>
9132
9133 * Makefile.in (linuw_low_h): Move higher.
9134 (thread-db.o): Depend on $(linux_low_h).
9135
54a0b537
PA
91362009-03-17 Pedro Alves <pedro@codesourcery.com>
9137
9138 Rename "process" to "lwp" throughout.
9139
9140 * linux-low.c (all_processes): Rename to...
9141 (all_lwps): ... this.
9142 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9143 (add_process): Rename to ...
9144 (add_lwp): ... this. Adjust.
9145 (linux_create_inferior): Adjust.
9146 (linux_attach_lwp): Adjust.
9147 (linux_attach): Adjust.
9148 (linux_kill_one_process): Rename to ...
9149 (linux_kill_one_lwp): ... this. Adjust.
9150 (linux_kill): Adjust.
9151 (linux_detach_one_process): Rename to ...
9152 (linux_detach_one_lwp): ... this. Adjust.
9153 (linux_detach): Adjust.
9154 (check_removed_breakpoint): Adjust.
9155 (status_pending_p): Adjust.
9156 (linux_wait_for_process): Rename to ...
9157 (linux_wait_for_lwp): ... this. Adjust.
9158 (linux_wait_for_event): Adjust.
9159 (send_sigstop): Adjust.
9160 (wait_for_sigstop): Adjust.
9161 (stop_all_processes): Rename to ...
9162 (stop_all_lwps): ... this.
9163 (linux_resume_one_process): Rename to ...
9164 (linux_resume_one_lwp): ... this. Adjust.
9165 (linux_set_resume_request, linux_continue_one_thread)
9166 (linux_queue_one_thread, resume_status_pending_p)
9167 (usr_store_inferior_registers, regsets_store_inferior_registers)
9168 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9169 Adjust.
9170 * linux-low.h (get_process): Rename to ...
9171 (get_lwp): ... this. Adjust.
9172 (get_thread_process): Rename to ...
9173 (get_thread_lwp): ... this. Adjust.
9174 (get_process_thread): Rename to ...
9175 (get_lwp_thread): ... this. Adjust.
9176 (struct process_info): Rename to ...
9177 (struct lwp_info): ... this.
9178 (all_processes): Rename to ...
9179 (all_lwps): ... this.
9180 * proc-service.c (ps_lgetregs): Adjust.
9181 * thread-db.c (thread_db_create_event, find_one_thread)
9182 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9183
0b16c5cf
PA
91842009-03-14 Pedro Alves <pedro@codesourcery.com>
9185
9186 * server.c (handle_query): Handle "qAttached".
9187
32de4b9d
NS
91882009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9189
9190 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9191 GPLv3, update license URL.
9192
2aecd87f
DE
91932009-03-01 Doug Evans <dje@google.com>
9194
93efd302 9195 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9196 (server_h): Add gdb_signals.h.
9197 (signals.o): Update.
9198 * server.h (target_signal_from_host,target_signal_to_host_p)
9199 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9200
86b1f9c5
PM
92012009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9202
9203 * remote-utils.c (getpkt): Also generate remote-debug
9204 information if noack_mode is set.
9205
4aa995e1
PA
92062009-02-06 Pedro Alves <pedro@codesourcery.com>
9207
9208 * server.c (handle_query): Report qXfer:siginfo:read and
9209 qXfer:siginfo:write as supported and handle them.
9210 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9211 * linux-low.c (linux_xfer_siginfo): New.
9212 (linux_target_ops): Set it.
9213
62709adf
PA
92142009-01-26 Pedro Alves <pedro@codesourcery.com>
9215
9216 * server.c (gdbserver_usage): Mention --remote-debug.
9217 (main): Accept '--remote-debug' switch.
9218
aef93bd7
DE
92192009-01-18 Doug Evans <dje@google.com>
9220
9221 * regcache.c (new_register_cache): No need to check result of xcalloc.
9222 * server.c (handle_search_memory): Back out calls to xmalloc,
9223 result is checked and error is returned to user upon failure.
9224 (handle_query): Ditto. Add more checks for result of malloc.
9225 (handle_v_cont): Check result of malloc, report error back to
9226 user upon failure.
9227 (handle_v_run): Ditto. Call freeargv.
9228 * server.h (freeargv): Declare.
9229 * utils.c (freeargv): New fn.
9230
54363045
DE
92312009-01-15 Doug Evans <dje@google.com>
9232
f626972c
DE
9233 * gdbreplay.c (perror_with_name): Make arg const char *.
9234 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9235 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9236 * utils.c (perror_with_name): Make arg const char *.
54363045 9237
18aae699
PA
92382009-01-14 Pedro Alves <pedro@codesourcery.com>
9239
9240 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9241 when handling a EXIT_PROCESS_DEBUG_EVENT.
9242
ff703abe
JB
92432009-01-06 Joel Brobecker <brobecker@adacore.com>
9244
9245 * gdbreplay.c (gdbreplay_version): Update copyright year.
9246 * server.c (gdbserver_version): Likewise.
9247
f21cc1a2 92482009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9249
9250 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9251 (handle_extended_wait): Improve comment.
0e21c1ec 9252
bca929d3
DE
92532008-12-13 Doug Evans <dje@google.com>
9254
9255 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9256 * server.h (ATTR_MALLOC): New macro.
9257 (xmalloc,xcalloc,xstrdup): Declare.
9258 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9259 * inferiors.c: Ditto.
9260 * linux-low.c: Ditto.
9261 * mem-break.c: Ditto.
9262 * regcache.c: Ditto.
9263 * remote-utils.c: Ditto.
9264 * server.c: Ditto.
9265 * target.c: Ditto.
9266 * win32-low.c: Ditto.
9267
97438e3f
DE
92682008-12-12 Doug Evans <dje@google.com>
9269
896c7fbb
DE
9270 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9271 in debugging printf.
9272
97438e3f
DE
9273 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9274
e3b886f8
DE
92752008-12-09 Doug Evans <dje@google.com>
9276
9277 * linux-low.h (struct process_info): Delete member tid, unused.
9278 * thread-db.c (find_one_thread): Update.
9279 (maybe_attach_thread): Update.
9280
07e059b5
VP
92812008-12-02 Pedro Alves <pedro@codesourcery.com>
9282
889bf7c5
PA
9283 * target.h (struct target_ops): Add qxfer_osdata member.
9284 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9285 and dirent.h.
9286 (linux_qxfer_osdata): New functions.
9287 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9288 callback.
9289 * server.c (handle_query): Handle "qXfer:osdata:read:".
9290 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9291 (buffer_xml_printf): New functions.
9292 * server.h (struct buffer): New.
9293 (buffer_grow_str, buffer_grow_str0): New macros.
9294 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9295 (buffer_xml_printf): Declare.
07e059b5 9296
4cab47ab
DE
92972008-11-24 Doug Evans <dje@google.com>
9298
9299 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9300
f142445f
DJ
93012008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9302
9303 * server.c (handle_v_run): Always use the supplied argument list.
9304
d0107bb6 93052008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9306
d0107bb6
BW
9307 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9308 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9309
2c4ad781
TJB
93102008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9311
9312 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9313 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9314 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9315 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9316 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9317 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9318 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9319 XML target descriptions.
9320 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9321 when inferior is running on an ISA 2.05 or later processor. Add
9322 special case to return offset for full 64-bit slot of FPSCR when
9323 in 32-bits.
9324
dfb64f85
DJ
93252008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9326
9327 * Makefile.in (SFILES, clean): Added sparc64 files.
9328 (reg-sparc64.o, reg-sparc64.c): New.
9329 * configure.srv (sparc*-*-linux*): New configuration.
9330 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9331 syscall arguments for SPARC.
9332 (regsets_store_inferior_registers): Likewise.
9333 * linux-sparc-low.c: New file.
9334
66b6e1dd
DE
93352008-10-21 Doug Evans <dje@google.com>
9336
9337 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9338 (READLINE_DIR,READLINE_DEP): Delete.
9339 (INTERNAL_CFLAGS): Update.
9340 (LINTFLAGS): Update.
9341
9b710a42
PA
93422008-10-10 Pedro Alves <pedro@codesourcery.com>
9343
9344 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9345 whole argv from the last run, not just argv[0].
9346
5822d809
PA
93472008-09-08 Pedro Alves <pedro@codesourcery.com>
9348
9349 * regcache.c (new_register_cache): Return NULL if the register
9350 cache size isn't known yet.
9351 (free_register_cache): Avoid dereferencing a NULL regcache.
9352
74aac56f
DJ
93532008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9354
9355 * configure.srv: Merge MIPS and MIPS64.
9356
400b20f5
MR
93572008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9358
9359 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9360
677c5bb1
LM
93612008-08-18 Luis Machado <luisgpm@br.ibm.com>
9362
9363 * Makefile.in: Add required vsx dependencies.
9364
9365 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9366 Declare init_registers_powerpc_vsx32l.
9367 Declare init_registers_powerpc_vsx64l.
9368 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9369 (ppc_arch_setup): Check for VSX in hwcap.
9370 (ppc_fill_vsxregset): New function.
9371 (ppc_store_vsxregset): New function.
9372 Add new VSX entry in regset_info target_regsets.
9373
9374 * configure.srv: Add new VSX dependencies.
9375
a6f3e723
SL
93762008-08-12 Pedro Alves <pedro@codesourcery.com>
9377
9378 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9379 (remote_open): Set or clear transport_is_reliable.
9380 (putpkt_binary): Don't expect acks in noack mode.
9381 (getpkt): Don't send ack/nac in noack mode.
9382 * server.c (handle_general_set): Handle QStartNoAckMode.
9383 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9384 qSupported.
9385 (main): Reset noack_mode on every connection.
9386 * server.h (noack_mode): Declare.
9387
a417dc56
RW
93882008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9389
9390 * Makefile.in (GDBREPLAY_OBS): New variable.
9391 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9392
3221518c
UW
93932008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9394 Daniel Jacobowitz <dan@codesourcery.com>
9395
9396 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9397 (usr_store_inferior_registers): Likewise.
9398 (regsets_store_inferior_registers): Likewise.
9399
ec56be1b
PA
94002008-07-31 Rolf Jansen <rj@surtec.com>
9401 Pedro Alves <pedro@codesourcery.com>
9402
9403 * configure.ac: Check for memmem declaration.
9404 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9405 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9406 (disable_packet_qfThreadInfo): Unconditionally compile.
9407 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9408 * configure, config.in: Regenerate.
9409
2fe5e3ff
DE
94102008-07-28 Doug Kwan <dougkwan@google.com>
9411
9412 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9413 (linux_write_memory): Remove declaration of errno.
9414
836acd6d
UW
94152008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9416
9417 * linux-low.c (handle_extended_wait): Do not use "status"
9418 variable uninitialized.
9419
aeba519e
PA
94202008-07-07 Pedro Alves <pedro@codesourcery.com>
9421
9422 * server.c (handle_v_attach): Inhibit reporting dll changes.
9423
db42f210
PA
94242008-06-27 Pedro Alves <pedro@codesourcery.com>
9425
9426 * remote-utils.c (prepare_resume_reply): If requested, don't
9427 output "thread:TID" in the T stop reply.
9428
9429 * server.c (disable_packet_vCont, disable_packet_Tthread)
9430 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9431 (handle_query): If requested, disable support for qC, qfThreadInfo
9432 and qsThreadInfo.
9433 (handle_v_requests): If requested, disable support for vCont.
9434 (gdbserver_show_disableable): New.
9435 (main): Handle --disable-packet and --disable-packet=LIST.
9436
9437 * server.h (disable_packet_vCont, disable_packet_Tthread)
9438 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9439
8e4c5421
CD
94402008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9441
9442 * server.c (gdbserver_usage): Mention --version.
9443
6e23a804
DJ
94442008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9445
9446 * Makefile.in (gdbreplay.o): New rule.
9447
90aa6a40
JM
94482008-06-06 Joseph Myers <joseph@codesourcery.com>
9449
9450 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9451 message, not gdbserver.
9452
c16158bc 94532008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9454 Nathan Sidwell <nathan@codesourcery.com>
9455 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9456
9457 * acinclude.m4: Include ../../config/acx.m4.
9458 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9459 * configure, config.in: Regenerate.
9460 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9461 * server.c (gdbserver_version): Print PKGVERSION.
9462 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9463 (main): Adjust gdbserver_usage calls.
9464 * gdbreplay.c (version, host_name): Add declarations.
9465 (gdbreplay_version, gdbreplay_usage): New.
9466 (main): Accept --version and --help options.
9467
aeb75bf5
DJ
94682008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9469
9470 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9471 (arm_breakpoint_at): Handle Thumb.
9472 (the_low_target): Add comment.
9473
76b233dd
UW
94742008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9475
9476 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9477
08388c79
DE
94782008-05-09 Doug Evans <dje@google.com>
9479
a3c83fae
DE
9480 * server.h (decode_search_memory_packet): Declare.
9481 * remote-utils.c (decode_search_memory_packet): New fn.
9482 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9483 (handle_search_memory): New fn.
9484 (handle_query): Process qSearch:memory packets.
9485
bb9c3d36
UW
94862008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9487
9488 * regcache.c (registers_length): Remove.
9489 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9490 full register packet.
9491 * regcache.h (registers_length): Remove prototype.
9492 * server.h (PBUFSIZ): Define to 16384.
9493
7284e1be
UW
94942008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9495
9496 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9497 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9498 powerpc-64l.o, and powerpc-altivec64l.o.
9499 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9500 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9501 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9502 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9503 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9504 to srv_xmlfiles.
9505
9506 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9507 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9508 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9509 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9510 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9511 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9512 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9513 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9514 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9515 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9516 (clean): Update.
9517
9518 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9519 (init_registers_powerpc_32l): ... this new prototype.
9520 (init_registers_powerpc_32): Remove, replace by ...
9521 (init_registers_powerpc_altivec32l): ... this new prototype.
9522 (init_registers_powerpc_e500): Remove, replace by ...
9523 (init_registers_powerpc_e500l): ... this new prototype.
9524 (init_registers_ppc64): Remove, replace by ...
9525 (init_registers_powerpc_64l): ... this new prototype.
9526 (init_registers_powerpc_64): Remove, replace by ...
9527 (init_registers_powerpc_altivec64l): ... this new prototype.
9528 (ppc_num_regs): Set to 73.
9529 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9530 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9531 (ppc_cannot_store_register): Handle orig_r3 and trap.
9532 (ppc_arch_setup): Update init_registers_... calls.
9533 (ppc_fill_gregset): Handle orig_r3 and trap.
9534
9535 * inferiors.c (clear_inferiors): Reset current_inferior.
9536
fdc59709
PB
95372008-04-23 Paolo Bonzini <bonzini@gnu.org>
9538
889bf7c5
PA
9539 * acinclude.m4: Add override.m4.
9540 * configure: Regenerate.
fdc59709 9541
c9b2f845
UW
95422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9543
9544 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9545 initial call to init_register_ppc64.
9546
550512b8
UW
95472008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9548
43aaf8b6
PA
9549 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9550 single powerpc*-*-linux* case.
550512b8
UW
9551 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9552
b6430ec3
UW
95532008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9554
9555 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9556 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9557 from reg_xmlfiles.
9558 * linux-ppc-low.c: Include <elf.h>.
9559 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9560 (ppc_hwcap): New global variable.
9561 (ppc_regmap): Remove __SPE__ #ifdef sections.
9562 (ppc_regmap_e500): New global variable.
9563 (ppc_cannot_store_register): Update __SPE__ special case.
9564 (ppc_get_hwcap): New function.
9565 (ppc_arch_setup): Use it to determine whether inferior supports
9566 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9567 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9568 Do not access registers if target does not support AltiVec.
9569 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9570 Do not access registers if target does not support SPE.
9571 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9572
52fa2412
UW
95732008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9574
9575 * linux-low.c (disabled_regsets, num_regsets): New.
9576 (use_regsets_p): Delete.
9577 (linux_wait_for_process): Clear disabled_regsets.
9578 (regsets_fetch_inferior_registers): Check and set it.
9579 (regsets_store_inferior_registers): Likewise.
9580 (linux_fetch_registers, linux_store_registers): Do not use
9581 use_regsets_p.
9582 (initialize_low): Allocate disabled_regsets.
9583
e28b3332
DJ
95842008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * Makefile.in (LIBOBJS): New.
9587 (OBS): Use LIBOBJS.
9588 (memmem.o): New rule.
9589 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9590 * configure: Regenerated.
9591
4536995d
UW
95922008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9593
9594 * server.c (handle_query): Never return "unsupported" for
9595 qXfer:features:read queries.
9596
221c031f
UW
95972008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9598
9599 * server.c (get_features_xml): Fix inverted condition.
9600 (handle_query): Always support qXfer:feature:read.
9601
ccd213ac
DJ
96022008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * server.c (wrapper_argv): New.
9605 (start_inferior): Handle wrapper_argv. If set, expect an extra
9606 trap.
9607 (gdbserver_usage): Document --wrapper.
9608 (main): Parse --wrapper.
9609
6fe305f7
UW
96102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9611
9612 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9613 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9614 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9615 (ppc_set_pc): Likewise.
9616 (ppc_arch_setup): New function.
9617 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9618 of collect_register.
889bf7c5 9619 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9620
5b0a002e
UW
96212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9622
9623 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9624 instead of linux-ppc64-low.o.
9625 * linux-ppc64-low.c: Remove file.
9626 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9627 (linux-ppc64-low.o): Remove rule.
9628
9629 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9630 (init_registers_powerpc_64): Likewise.
9631 (ppc_regmap): Conditionally define depending on __powerpc64__.
9632 (ppc_cannot_store_register): Do not special-case "fpscr" when
9633 compiled on __powerpc64__.
9634 (ppc_collect_ptrace_register): New function.
9635 (ppc_supply_ptrace_register): New function.
9636 (ppc_breakpoint): Change type to "unsigned int".
9637 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9638 (the_low_target): Conditionally provide initializers for the
889bf7c5 9639 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9640 collect_ptrace_register and supply_ptrace_register members.
9641
9b4b61c8
UW
96422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9643
9644 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9645 * server.c (gdbserver_xmltarget): Define.
9646 (get_features_xml): Use it to replace "target.xml" and arch_string.
9647
9648 * configure.srv: Remove srv_xmltarget. Add XML files that were
9649 mentioned there to srv_xmlfiles instead. Remove conditional tests
9650 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9651 srv_xmlfiles and srv_regobj to include all possible choices.
9652 * configure.ac (srv_xmltarget): Remove.
9653 (srv_xmlfiles): Do not add "target.xml".
9654 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9655 checks for supplementary target information.
9656 * configure: Regenerate.
9657 * Makefile.in (XML_TARGET): Remove.
9658 (target.xml): Remove rule.
9659 (clean): Do not clean up target.xml.
9660 (.PRECIOUS): Do not mention target.xml.
9661
9662 * target.h (struct target_ops): Remove arch_string member.
9663 * linux-low.c (linux_arch_string): Remove.
9664 (linux_target_ops): Remove arch_string initializer.
9665 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9666 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9667 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9668 * spu-low.c (spu_arch_string): Remove.
9669 (spu_target_ops): Remove arch_string initializer.
9670 * win32-low.c (win32_arch_string): Remove.
9671 (win32_target_ops): Remove arch_string initializer.
9672 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9673 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9674 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9675
ee1a7ae4
UW
96762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9677
9678 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9679 by collect_ptrace_register and supply_ptrace_register hooks.
9680 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9681 instead of checking for the_low_target.left_pad_xfer.
9682 (usr_store_inferior_registers): Use collect_ptrace_register callback
9683 instead of checking for the_low_target.left_pad_xfer.
9684
9685 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9686 (s390_supply_ptrace_register): Likewise.
9687 (s390_fill_gregset): Call s390_collect_ptrace_register.
9688 (the_low_target): Update.
9689
9690 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9691 (ppc_supply_ptrace_register): Likewise.
9692 (the_low_target): Update.
9693
9694 * linux-i386-low.c (the_low_target): Update.
9695 * linux-x86-64-low.c (the_low_target): Update.
9696
d61ddec4
UW
96972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9698
9699 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9700 reg-s390.o and reg-s390x.o.
9701
9702 * linux-low.c (new_inferior): New global variable.
9703 (linux_create_inferior, linux_attach): Set it.
9704 (linux_wait_for_process): Call the_low_target.arch_setup after the
9705 target has stopped for the first time.
9706 (initialize_low): Do not call the_low_target.arch_setup.
9707
9708 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9709 (s390_set_pc): Likewise.
9710 (s390_arch_setup): New function.
9711 (the_low_target): Use s390_arch_setup as arch_setup routine.
9712
9713 * regcache.c (realloc_register_cache): New function.
9714 (set_register_cache): Call it for each existing regcache.
9715
d05b4ac3
UW
97162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9717
9718 * server.h (init_registers): Remove prototype.
9719
9720 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9721 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9722 instead of init_registers ().
9723 * linux-arm-low.c (init_registers_arm): Add prototype.
9724 (init_registers_arm_with_iwmmxt): Likewise.
9725 (the_low_target): Add initializer for arch_setup field.
9726 * linux-cris-low.c (init_registers_cris): Add prototype.
9727 (the_low_target): Add initializer for arch_setup field.
9728 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9729 (the_low_target): Add initializer for arch_setup field.
9730 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9731 (the_low_target): Add initializer for arch_setup field.
9732 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9733 (the_low_target): Add initializer for arch_setup field.
9734 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9735 (the_low_target): Add initializer for arch_setup field.
9736 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9737 (the_low_target): Add initializer for arch_setup field.
9738 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9739 (init_registers_mips64_linux): Likewise.
9740 (the_low_target): Add initializer for arch_setup field.
9741 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9742 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9743 (the_low_target): Add initializer for arch_setup field.
9744 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9745 (init_registers_powerpc_64): Likewise.
9746 (the_low_target): Add initializer for arch_setup field.
9747 * linux-s390-low.c (init_registers_s390): Add prototype.
9748 (init_registers_s390x): Likewise.
9749 (the_low_target): Add initializer for arch_setup field.
9750 * linux-sh-low.c (init_registers_sh): Add prototype.
9751 (the_low_target): Add initializer for arch_setup field.
9752 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9753 (the_low_target): Add initializer for arch_setup field.
9754 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9755 (the_low_target): Add initializer for arch_setup field.
9756
9757 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9758 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9759 instead of init_registers ().
9760 * win32-arm-low.c (init_registers_arm): Add prototype.
9761 (the_low_target): Add initializer for arch_setup field.
9762 * win32-i386-low.c (init_registers_i386): Add prototype.
9763 (the_low_target): Add initializer for arch_setup field.
9764
9765 * spu-low.c (init_registers_spu): Add prototype.
9766 (initialize_low): Call initialie_registers_spu () instead of
9767 initialize_registers ().
9768
fd96d250
PA
97692008-02-19 Pedro Alves <pedro@codesourcery.com>
9770
9771 * server.c (handle_v_requests): When handling the vRun and vAttach
9772 packets, if already debugging a process, don't kill it. Return an
9773 error instead.
9774
d41b6bb4
DJ
97752008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9776
9777 * server.c (handle_query): Correct length check.
9778
5ac588cf
PA
97792008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9780
9781 * win32-low.c (do_initial_child_stuff): Add process handle
9782 parameter. Set current_process_handle and current_process_id from the
9783 parameters. Clear globals.
9784 (win32_create_inferior): Don't set current_process_handle and
9785 current_process_id here. Instead pass them on the call to
9786 do_initial_child_stuff.
9787 (win32_attach): Likewise.
9788 (win32_clear_inferiors): New.
9789 (win32_kill): Don't close the current process handle or the
9790 current thread handle here. Instead call win32_clear_inferiors.
9791 (win32_detach): Don't open a new handle to the process. Call
9792 win32_clear_inferiors.
9793 (win32_join): Don't rely on current_process_handle; open a new
9794 handle using the process id.
9795 (win32_wait): Call win32_clear_inferiors when the inferior process
9796 has exited.
9797
ecd7ecbc
DJ
97982008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * server.c (monitor_show_help): Add "exit".
9801
1525d545
MG
98022008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9803
ecd7ecbc 9804 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9805 (clean): Add reg-xtensa.c.
9806 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9807 * configure.srv (xtensa*-*-linux*) New target.
9808 * linux-xtensa-low.c: New.
9809 * xtensa-xtregs.c: New.
1525d545 9810
59a016f0
PA
98112008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9812
9813 * hostio.c: Don't include errno.h.
9814 (errno_to_fileio_errno): Move to hostio-errno.
9815 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9816 error number outputting to the target->hostio_last_error callback.
9817 (hostio_packet_error): Use FILEIO_EINVAL directly.
9818 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9819 calls to hostio_error.
9820 * hostio-errno.c: New.
9821 * server.h (hostio_last_error_from_errno): Declare.
9822 * target.h (target_ops): Add hostio_last_error member.
9823 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9824 as hostio_last_error handler.
889bf7c5 9825 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9826 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9827 (wince_hostio_last_error): New functions.
9828 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9829 as hostio_last_error handler.
9830 (win32_target_ops) [!_WIN32_WCE]: Register
9831 hostio_last_error_from_errno as hostio_last_error handler.
9832 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9833 (hostio-errno.o): New rule.
9834 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9835 * configure.srv (srv_hostio_err_objs): New variable. Default to
9836 hostio-errno.o.
9837 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9838 * configure: Regenerate.
9839
2d717e4f
DJ
98402008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9841
9842 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9843 (linux_kill, linux_detach): Clean up the process list.
9844 * remote-utils.c (remote_open): Improve port number parsing.
9845 (putpkt_binary, input_interrupt): Only send interrupts if the target
9846 is running.
9847 * server.c (extended_protocol): Make static.
9848 (attached): Define earlier.
9849 (exit_requested, response_needed, program_argv): New variables.
9850 (target_running): New.
9851 (start_inferior): Clear attached here.
9852 (attach_inferior): Set attached here.
9853 (require_running): Define.
9854 (handle_query): Use require_running and target_running. Implement
9855 "monitor exit".
9856 (handle_v_attach, handle_v_run): New.
9857 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9858 (gdbserver_usage): Update.
9859 (main): Redo argument parsing. Handle --debug and --multi. Handle
9860 --attach along with other options or after the port. Save
9861 program_argv. Support no initial program. Resynchronize
9862 communication with GDB after an error. Handle "monitor exit".
9863 Use require_running and target_running. Always allow the extended
9864 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9865 restart in extended mode.
9866 * README: Refer to the GDB manual. Update --attach usage.
9867
7407e2de
AS
98682007-12-20 Andreas Schwab <schwab@suse.de>
9869
9870 * linux-low.c (STACK_SIZE): Define.
9871 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9872 (linux_test_for_tracefork): Likewise.
9873
b65d95c5
DJ
98742007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * linux-low.c (linux_wait_for_event): Update messages. Do not
9877 reinsert auto-delete breakpoints.
9878 * mem-break.c (struct breakpoint): Change return type of handler to
9879 int.
9880 (set_breakpoint_at): Update handler type.
9881 (reinsert_breakpoint_handler): Return 1 instead of calling
9882 delete_breakpoint.
9883 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9884 setting a new one.
9885 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9886 * mem-break.h (set_breakpoint_at): Update handler type.
9887 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9888 * win32-low.c (auto_delete_breakpoint): New.
9889 (get_child_debug_event): Use it.
9890
4e799345
DJ
98912007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9892
9893 * configure.ac: Check for pread and pwrite.
9894 * hostio.c (handle_pread): Fall back to lseek and read.
9895 (handle_pwrite): Fall back to lseek and write.
9896 * config.in, configure: Regenerated.
9897
27524b67
DJ
98982007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * server.c (myresume): Add own_buf argument.
9901 (main): Update calls.
9902
a20d5e98
DJ
99032007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9904
9905 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9906 * remote-utils.c (remote_open): Do not call disable_async_io.
9907 (block_async_io): Delete.
9908 (unblock_async_io): Make static.
9909 (initialize_async_io): New.
9910 * server.c (handle_v_cont): Handle async I/O here.
9911 (myresume): Likewise. Move other common resume tasks here...
9912 (main): ... from here. Call initialize_async_io. Disable async
9913 I/O before the main loop.
9914 * server.h (initialize_async_io): Declare.
9915 (block_async_io, unblock_async_io): Delete prototypes.
9916 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9917
b79d787e
DJ
99182007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9919
9920 * remote-utils.c (readchar): Allow binary data in received messages.
9921
d97903b2
PA
99222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9923
9924 * win32-low.c (attaching): New global.
9925 (win32_create_inferior): Clear the `attaching' global.
9926 (win32_attach): Set the `attaching' global.
9927 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9928 attaching. Only set a breakpoint at the entry point if not
9929 attaching.
9930
311de423
PA
99312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9932
9933 * server.c (main): Don't report dll events on the initial
9934 connection on attaches.
9935
6c2d16d2
PA
99362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9937
9938 * server.c (main): Relax numerical bases supported for the pid of
9939 the --attach command line argument.
9940
5ca906e6
PA
99412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9942
9943 * win32-low.c (win32_attach): Call OpenProcess before
9944 DebugActiveProcess, not after. Add last error output to error
9945 call.
9946
9c6c8194
PA
99472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9948
9949 * win32-low.c (win32_get_thread_context)
9950 (win32_set_thread_context): New functions.
9951 (thread_rec): Use win32_get_thread_context.
9952 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9953 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9954 field.
9955
4d5d1aaa
PA
99562007-12-03 Leo Zayas
9957 Pedro Alves <pedro_alves@portugalmail.pt>
9958
9959 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9960 global variables.
9961 (child_add_thread): Minor cleanup.
9962 (child_continue): Resume artificially suspended threads before
9963 calling ContinueDebugEvent.
9964 (suspend_one_thread): New.
9965 (fake_breakpoint_event): New.
9966 (get_child_debug_event): Change return type to int. Check here if
9967 gdb sent an interrupt request. If a soft interrupt was requested,
9968 fake a breakpoint event. Return 0 if there is no event to handle,
9969 and 1 otherwise.
9970 (win32_wait): Don't check here if gdb sent an interrupt request.
9971 Ensure there is a valid event to handle.
9972 (win32_request_interrupt): Add soft interruption method as last
9973 resort.
9974
c436e841
PA
99752007-12-03 Leo Zayas
9976 Pedro Alves <pedro_alves@portugalmail.pt>
9977
9978 * win32-low.h (win32_thread_info): Add descriptions to the
9979 structure members. Replace `suspend_count' counter by a
9980 `suspended' flag.
9981 * win32-low.c (thread_rec): Update condition of when to get the
9982 context from the inferior. Rely on ContextFlags being set if it
9983 has already been retrieved. Only suspend the inferior thread if
9984 we haven't already. Warn if that fails.
9985 (continue_one_thread): s/suspend_count/suspended/. Only call
9986 ResumeThread once. Warn if that fails.
9987
e7b5fa67
PA
99882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9989
9990 * win32-low.c (win32_wait): Don't read from the inferior when it
9991 has already exited.
9992
a385171d
PA
99932007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9994
9995 * Makefile.in (win32_low_h): New variable.
9996 (win32-low.o): Add dependency on $(win32_low_h).
9997 (win32-arm-low.o, win32-i386-low.o): New rules.
9998
f80c84b3
DJ
99992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * hostio.c: Correct copyright year.
10002
a6b151f1
DJ
100032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * Makefile.in (OBS): Add hostio.o.
10006 (hostio.o): New rule.
10007 * server.h (handle_vFile): Declare.
10008 * hostio.c: New file.
10009 * server.c (handle_v_requests): Take packet_len and new_packet_len
10010 for binary packets. Call handle_vFile.
10011 (main): Update call to handle_v_requests.
10012
f9387fc3
DJ
100132007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10014
10015 * linux-low.c: Include <sched.h>.
10016
51c2684e
DJ
100172007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * linux-low.c (linux_tracefork_grandchild): New.
10020 (linux_tracefork_child): Use clone.
10021 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10022
75f83163
JB
100232007-10-31 Joel Brobecker <brobecker@adacore.com>
10024
10025 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10026
da5898ce
DJ
100272007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10028
10029 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10030
24a09b5f
DJ
100312007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10032
10033 * inferiors.c (change_inferior_id): Delete.
10034 (add_pid_to_list, pull_pid_from_list): New.
10035 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10036 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10037 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10038 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10039 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10040 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10041 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10042 (using_threads): Always set to 1.
10043 (handle_extended_wait): New.
10044 (add_process): Do not set TID.
10045 (linux_create_inferior): Set must_set_ptrace_flags.
10046 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10047 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10048 (linux_thread_alive): Rename TID argument to LWPID.
10049 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10050 (linux_wait_for_event): Do not use TID or check using_threads. Update
10051 call to dead_thread_notify. Call handle_extended_wait.
10052 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10053 (send_sigstop): Delete sigstop_sent.
10054 (wait_for_sigstop): Avoid TID.
10055 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10056 (linux_test_for_tracefork): New.
10057 (linux_lookup_signals): Use thread_db_active and
10058 linux_supports_tracefork_flag.
10059 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10060 * linux-low.h (get_process_thread): Avoid TID.
10061 (struct process_ifo): Move thread_known and tid to the end. Remove
10062 sigstop_sent.
10063 (linux_attach_lwp, thread_db_init): Update prototypes.
10064 * server.h (change_inferior_id): Delete prototype.
10065 (add_pid_to_list, pull_pid_from_list): New prototypes.
10066 * thread-db.c (thread_db_use_events): New.
10067 (find_first_thread): Rename to...
10068 (find_one_thread): ...this. Update callers and messages. Do not
10069 call fatal. Check thread_db_use_events. Do not call
10070 change_inferior_id or new_thread_notify.
10071 (maybe_attach_thread): Update. Do not call new_thread_notify.
10072 (thread_db_init): Set thread_db_use_events. Check use_events.
10073 * utils.c (fatal, warning): Correct message prefix.
10074
30ed0a8f
DJ
100752007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10076
10077 * Makefile.in (clean): Remove new files.
10078 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10079 (powerpc-64.o, powerpc-64.c): New rules.
10080 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10081 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10082 with SPE.
10083 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10084 SPE targets.
10085 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10086 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10087 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10088 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10089 (target_regsets): Add AltiVec and SPE register sets.
10090 * configure.ac: Check for AltiVec and SPE.
10091 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10092 (ppc_fill_vrregset, ppc_store_vrregset): New.
10093 (target_regsets): Add AltiVec register set.
10094 * configure: Regenerated.
10095
fd462a61
DJ
100962007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10097
10098 * linux-low.c (O_LARGEFILE): Define.
10099 (linux_read_memory): Use /proc/PID/mem.
10100 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10101 * configure, config.in: Regenerated.
10102
69f223ed
DJ
101032007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10104
10105 * linux-low.c (linux_wait_for_event): Do not pass signals while
10106 single-stepping.
10107
aec18585
PA
101082007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10109
10110 * win32-low.c (create_process): New.
10111 (win32_create_inferior): Use create_process instead of
10112 CreateProcess. If create_process failed retry appending an ".exe"
10113 suffix. Store the GetLastError result immediatelly after
10114 create_process calls and use it on the call to error.
10115
34d86ddd
PA
101162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10117
10118 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10119
5a0e3bd0
JB
101202007-08-23 Joel Brobecker <brobecker@adacore.com>
10121
10122 * configure.ac: Switch license to GPLv3.
10123
f88c79e6
MS
101242007-08-01 Michael Snyder <msnyder@access-company.com>
10125
10126 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10127
6b3d9b83
PA
101282007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10129
10130 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10131 typedef.
10132 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10133 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10134 CloseToolhelp32Snapshot.
10135 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10136 CloseToolhelp32Snapshot.
10137
c588c53c
MS
101382007-07-27 Michael Snyder <michael.snyder@access-company.com>
10139
10140 * server.c (main): Check for inferior exit before main loop.
10141
aa0403d9
PA
101422007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10143
10144 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10145 instead of on tmp_desc.
10146
255e7678
DJ
101472007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10148 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10151 (add_thread): Minor cleanups.
10152 (clear_inferiors): Move lower in the file. Clear the DLL
10153 list.
10154 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10155 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10156 (xml_escape_text): New.
10157 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10158 for qSupported.
10159 (handle_v_cont): Report errors.
10160 (gdbserver_version): Update.
10161 (main): Correct size of own_buf. Do not report initial DLL events.
10162 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10163 (unloaded_dll, xml_escape_text): New.
10164 * win32-low.c (enum target_waitkind): Update comments.
10165 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10166 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10167 (win32_EnumProcessModules, win32_GetModuleInformation)
10168 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10169 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10170 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10171 (win32_Module32First, win32_Module32Next, load_toolhelp)
10172 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10173 (get_child_debug_event): Handle DLL events.
10174 (win32_wait): Likewise.
10175
0d37add9
DJ
101762007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10179 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10180
45e2715e
PA
101812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10182
10183 * win32-low.c (handle_output_debug_string): Ignore event if not
10184 waiting.
10185
c5674cf1
PA
101862007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10187
10188 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10189
2bbe3cc1
DJ
101902007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10191
10192 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10193
ae13219e
DJ
101942007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10195
10196 * inferiors.c (change_inferior_id): Add comment.
10197 * linux-low.c (check_removed_breakpoint): Add an early
10198 prototype. Improve debug output.
10199 (linux_attach): Doc update.
10200 (linux_detach_one_process, linux_detach): Clean up before releasing
10201 each process.
10202 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10203 * linux-low.h (struct process_info): Doc improvement.
10204 * mem-break.c (delete_all_breakpoints): New.
10205 * mem-break.h (delete_all_breakpoints): New prototype.
10206 * thread-db.c (find_first_thread): New.
10207 (thread_db_create_event): Call it instead of
10208 thread_db_find_new_threads. Clean up unused variables.
10209 (maybe_attach_thread): Remove first thread handling.
10210 (thread_db_find_new_threads): Use find_first_thread.
10211 (thread_db_get_tls_address): Likewise.
10212
4105de34
DJ
102132007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10214
10215 * thread-db.c (thread_db_find_new_threads): Add prototype.
10216 (thread_db_create_event): Check for the main thread before adding
10217 a new thread.
10218 (maybe_attach_thread): Only enable event reporting if TID == 0.
10219 (thread_db_get_tls_address): Check for new threads.
10220
2b876972
DJ
102212007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10222
10223 * linux-low.c (linux_create_inferior): Try execv before execvp.
10224 * spu-low.c (spu_create_inferior): Likewise.
10225
7a245884
DJ
102262007-06-13 Mike Frysinger <vapier@gentoo.org>
10227
10228 * linux-low.c (linux_create_inferior): Change execv to execvp.
10229 * spu-low.c (spu_create_inferior): Likewies.
10230
117ce543
DJ
102312007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * Makefile.in (clean): Clean new files instead of deleted ones.
10234 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10235 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10236 rules.
10237 * configure.srv: Specify XML files and new regformats for MIPS and
10238 MIPS64 GNU/Linux.
10239 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10240 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10241 an entry for the restart register.
10242 (mips_cannot_fetch_register, mips_cannot_store_register)
10243 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10244 register names to match the XML descriptions.
10245 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10246 restart register instead of $0.
10247
0e7f50da
UW
102482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10249 Markus Deuling <deuling@de.ibm.com>
10250
10251 * remote-utils.c (decode_xfer_write): New function.
10252 * server.h (decode_xfer_write): Add prototype.
10253 * server.c (handle_query): Add PACKET_LEN argument. Support
10254 qXfer:spu:read and qXfer:spu:write packets.
10255 (main): Pass packet_len to handle_query.
10256 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10257 * target.h (target_ops): Add qxfer_spu.
10258
374c1d38
UW
102592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10260
10261 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10262 accessing non-seekable spufs files.
10263
bb63802a
UW
102642007-05-16 Markus Deuling <deuling@de.ibm.com>
10265
889bf7c5 10266 * server.c (handle_query): Add reply for qC packet.
bb63802a 10267
7390519e
PA
102682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10269 Leo Zayas <lerele@champenstudios@com>
10270
10271 * server.h (check_remote_input_interrupt_request): New function.
10272 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10273 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10274 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10275 (check_remote_input_interrupt_request): New function.
10276 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10277 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10278 winapi_GenerateConsoleCtrlEvent): New typedefs.
10279 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10280 to 250 ms.
10281 (win32_wait): Check for remote interrupt request
10282 with check_remote_input_interrupt_request.
10283 (win32_request_interrupt): New function.
10284 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10285
34b34921
PA
102862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10287
10288 * win32-low.c (debug_registers_changed,
10289 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10290 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10291 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10292 (thread_rec): Get context using the low target.
10293 (child_add_thread): Call thread_added on the low target,
10294 which does the same thing.
10295 (regptr): Delete.
10296 (do_initial_child_stuff): Remove debug registers references.
10297 Set context using the low target. Resume threads after
10298 setting the contexts.
10299 (child_continue): Remove dead variable. Remove debug
10300 registers references.
10301 (child_fetch_inferior_registers): Go through the low target.
10302 (do_child_store_inferior_registers): Remove.
10303 (child_store_inferior_registers): Go through the low target.
10304 (win32_resume): Remove debug registers references.
10305 Set context using the low target.
10306 (handle_exception): Change return type to void. Don't record
10307 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10308 first chance exception.
889bf7c5 10309 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10310 goto loop. Always return after waiting for debug event.
10311 (win32_wait): Convert to switch statement. Handle spurious
10312 events.
10313
10314 * win32-i386-low.c (debug_registers_changed,
10315 debug_registers_used): New.
10316 (initial_stuff): Rename to ...
10317 (i386_initial_stuff): ... this. Clear debug registers
10318 state variables.
10319 (store_debug_registers): Delete.
10320 (i386_get_thread_context): New.
10321 (load_debug_registers): Delete.
10322 (i386_set_thread_context): New.
10323 (i386_thread_added): New.
10324 (single_step): Rename to ...
10325 (i386_single_step): ... this.
10326 (do_fetch_inferior_registers): Rename to ...
10327 (i386_fetch_inferior_register): ... this.
10328 (i386_store_inferior_register): New.
10329 (the_low_target): Adapt to new interface.
10330
10331 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10332 (arm_get_thread_context): New.
10333 (arm_set_thread_context): New.
10334 (regptr): New.
10335 (do_fetch_inferior_registers): Rename to ...
10336 (arm_fetch_inferior_register): ... this.
10337 (arm_store_inferior_register): New.
10338 (arm_wince_breakpoint): Reimplement as unsigned long.
10339 (arm_wince_breakpoint_len): Define.
10340 (the_low_target): Adapt to new interface.
10341
10342 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10343 load_debug_registers. Add get_thread_context, set_thread_context,
10344 thread_added and store_inferior_register. Rename
10345 fetch_inferior_registers to fetch_inferior_register.
10346 (regptr): Remove declaration.
10347
dd6953e1
PA
103482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10349
10350 * linux-low.c (linux_detach): Change return type to int. Return 0.
10351 * spu-low.c (spu_detach): Likewise.
10352
444d6139
PA
103532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10354
10355 * target.h (target_ops): Change return type of detach to int.
10356 Add join.
10357 (join_inferior): New.
10358 * server.c (main): Don't skip detach support on mingw32.
10359 If the inferior doesn't support detaching return error.
10360 Call join_inferior instead of using waitpid.
10361 * linux-low.c (linux_join): New.
10362 (linux_target_op): Add linux_join.
10363 * spu-low.c (spu_join): New.
10364 (spu_target_ops): Add spu_join.
10365 * win32-low.c (win32_detach): Adapt to new interface.
10366 Reopen current_process_handle before detaching. Issue a child
10367 resume before detaching.
10368 (win32_join): New.
10369 (win32_target_op): Add win32_join.
10370
1d5315fe
PA
103712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10372
10373 * win32-low.c (win32-attach): Fix return value.
10374 * target.h (target_ops): Describe ATTACH return values.
10375
bf914831
PA
103762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10377
10378 * win32-low.c (GETPROCADDRESS): Define.
10379 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10380 (winapi_DebugSetProcessKillOnExit): Likewise.
10381 (win32_create_inferior): Force usage of ansi CreateProcessA.
10382 (win32_attach): Use GETPROCADDRESS.
10383 (win32_detach): Likewise.
10384
f72f3e60
PA
103852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10386
10387 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10388
ed50f18f
PA
103892007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10390
10391 * win32-low.c: Commit leftover changes from 2007-03-29.
10392
0c2ead7e
DJ
103932007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10396 fields short instead of int. Add explicit padding.
10397 (i387_cache_to_fsave): Remove unnecessary casts.
10398 (i387_fsave_to_cache): Doc fix.
10399 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10400
73725ff3
DJ
104012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10404 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10405
d99f33d8
PA
104062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10407
10408 * configure.srv (arm*-*-mingw32ce*): Move near the other
10409 arm targets.
10410
68070c10
PA
104112007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10412
2482afc6 10413 * configure.ac: Add errno checking.
68070c10
PA
10414 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10415 sys/file.h and malloc.h.
10416 (AC_CHECK_DECLS): Add perror.
10417 (srv_mingwce): Handle.
2482afc6 10418 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10419 win32-i386-low.o to srv_tgtobj.
10420 (i[34567]86-*-mingw*): Likewise.
10421 (arm*-*-mingw32ce*): Add case.
10422 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10423 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10424 [__MINGW32CE__] (strerror): New function.
10425 [__MINGW32CE__] (errno): Define to GetLastError.
10426 [__MINGW32CE__] (COUNTOF): New macro.
10427 (remote_open): Remove extra close call.
10428 * mem-break.c (delete_breakpoint_at): New function.
10429 * mem-break.h (delete_breakpoint_at): Declare.
10430 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10431 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10432 [USE_WIN32API] (read, write): Add char* casts.
10433 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10434 * server.h: Include wincecompat.h on Windows CE.
10435 [HAVE_ERRNO_H]: Check.
10436 (perror): Declare if not declared.
10437 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10438 (perror_with_name): Remove errno declaration.
10439 * wincecompat.h: New.
10440 * wincecompat.c: New.
10441 * win32-low.h: New.
10442 * win32-arm-low.c: New.
10443 * win32-i386-low.c: New.
10444 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10445 (OUTMSG2): Make it safe.
10446 (_T): New macro.
10447 (COUNTOF): New macro.
10448 (NUM_REGS): Get it from the low target.
10449 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10450 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10451 (thread_rec): Let low target handle debug registers.
10452 (child_add_thread): Likewise.
10453 (child_init_thread_list): Likewise.
10454 (continue_one_thread): Likewise.
10455 (regptr): New.
10456 (do_child_fetch_inferior_registers): Move to ...
10457 * win32-i386-low.c: ... here, and rename to ...
10458 (do_fetch_inferior_registers): ... this.
889bf7c5 10459 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10460 Go through the low target.
10461 (do_child_store_inferior_registers): Use regptr.
10462 (strwinerror): New function.
10463 (win32_create_inferior): Handle Windows CE.
10464 Use strwinerror instead of strerror on Windows error
10465 codes. Add program to the error output.
10466 Don't close the main thread handle on Windows CE.
10467 (win32_attach): Use coredll.dll on Windows CE.
10468 (win32_kill): Close current process and current
10469 thread handles.
10470 (win32_detach): Use coredll.dll on Windows CE.
10471 (win32_resume): Let low target handle debug registers, and
10472 step request.
10473 (handle_exception): Add/Remove initial breakpoint. Avoid
10474 non-existant WSTOPSIG on Windows CE.
10475 (win32_read_inferior_memory): Cast to remove warning.
10476 (win32_arch_string): Go through the low target.
10477 (initialize_low): Call set_breakpoint_data with the low
10478 target's breakpoint.
10479 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10480 FOP_REGNUM, mappings): Move to ...
10481 * win32-i386-low.c: ... here.
10482 * win32-low.c (win32_thread_info): Move to ...
10483 * win32-low.h: ... here.
10484 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10485 win32-arm-low.c and wincecompat.c.
10486 (all:): Add $EXEEXT.
10487 (install-only:): Likewise.
10488 (gdbserver:): Likewise.
10489 (gdbreplay:): Likewise.
10490 * config.in: Regenerate.
10491 * configure: Regenerate.
10492
41093d81
PA
104932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10494
10495 * win32-low.c: Rename typedef thread_info to
10496 win32_thread_info throughout.
10497
544afa54
PA
104982007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10499
10500 * win32-i386-low.c: Rename to ...
10501 * win32-low.c: ... this.
10502 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10503 * Makefile.in: Likewise.
10504
bce7165d
PA
105052007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10506
10507 * remote-utils.c (monitor_output): Constify msg parameter.
10508 * server.h (monitor_output): Likewise.
10509 * win32-i386-low.c (handle_output_debug_string): New.
10510 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10511 handle_output_debug_string.
10512 (get_child_debug_event): Likewise.
10513
506c7aa0
DJ
105142007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10515
10516 * server.c (main): Correct strtoul check.
10517
42c81e2a
DJ
105182007-03-27 Jon Ringle <jon@ringle.org>
10519
10520 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10521
9453113a
DJ
105222007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10523
10524 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10525
64a69107
DJ
105262007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10527
10528 * terminal.h: Check HAVE_SGTTY_H.
10529
105302007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10531
10532 * remote-utils.c (remote_open): Print out the assigned port number.
10533
c74d0ad8
DJ
105342007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10535
10536 * remote-utils.c (monitor_output): New function.
10537 * server.c (debug_threads): Define here.
10538 (monitor_show_help): New function.
10539 (handle_query): Handle qRcmd.
10540 (main): Do not handle 'd' packet.
10541 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10542 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10543 of debug_threads.
10544
de7c3b4a
PA
105452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10546
10547 * Makefile.in (EXEEXT): New.
10548 (clean): Use $(EXEEXT).
10549
ef57601b
PA
105502007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10551
10552 * target.h (target_ops): Rename send_signal to request_interrupt,
10553 and remove enum target_signal parameter.
10554 * linux-low.c (linux_request_interrupt): Rename from
10555 linux_send_signal, and always send SIGINT.
10556 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10557 and always send SIGINT.
10558 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10559 of send_signal.
10560 (input_interrupt): Likewise.
10561
820f2bda
PA
105622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10563
10564 * server.c (get_features_xml): Check if target implemented
10565 arch_string.
10566 * win32-i386-low.c (win32_arch_string): New.
10567 (win32_target_ops): Add win32_arch_string as arch_string member.
10568
ab39bf24
UW
105692007-02-22 Markus Deuling <deuling@de.ibm.com>
10570
10571 * spu-low.c (spu_arch_string): New.
10572 (spu_target_ops): Add spu_arch_string.
10573
61ff6e04
DJ
105742007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10575
10576 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10577 * configure.ac: Do not check for terminal.h.
10578 * configure, config.in: Regenerated.
10579
fb1e4ffc
DJ
105802007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10581
10582 * Makefile.in (OBS): Add $(XML_BUILTIN).
10583 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10584 (clean): Update.
10585 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10586 (arm-with-iwmmxt.c): New.
10587 * config.in, configure: Regenerate.
10588 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10589 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10590 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10591 (arm*-*-linux*): Add iWMMXt and regset support.
10592 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10593 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10594 (arm_store_wmmxregset, target_regsets): New.
10595 * server.c (get_features_xml): Take annex argument. Check builtin
10596 XML documents.
10597 (handle_query): Handle multiple annexes.
10598
0f48aa01
DJ
105992007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * remote-utils.c [USE_WIN32API] (read, write): Define.
10602 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10603 write.
10604
23181151
DJ
106052007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10606
10607 * linux-i386-low.c (the_low_target): Set arch_string.
10608 * linux-x86-64-low.c (the_low_target): Likewise.
10609 * linux-low.c (linux_arch_string): New.
10610 (linux_target_ops): Add it.
10611 * linux-low.h (struct linux_target_ops): Add arch_string.
10612 * server.c (write_qxfer_response): Use const void * for DATA.
10613 (get_features_xml): New.
10614 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10615 * target.h (struct target_ops): Add arch_string method.
10616
9d606399
DJ
106172007-01-03 Denis Pilat <denis.pilat@st.com>
10618 Daniel Jacobowitz <dan@codesourcery.com>
10619
10620 * linux-low.c (linux_kill): Handle being called with no threads.
10621 * win32-i386-low.c (win32_kill): Likewise.
10622 (get_child_debug_event): Clear current_process_handle.
10623
106242006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10625 Daniel Jacobowitz <dan@codesourcery.com>
10626
10627 * remote-utils.c (remote_open): Check the type of specified
10628 serial port devices before opening them.
10629 * server.c (main): Kill the inferior if an error occurs during
10630 the first remote_open.
10631
a5e13d24
DJ
106322006-12-05 Markus Deuling <deuling@de.ibm.com>
10633
10634 * README: Update supported targets.
10635
186947f7
DJ
106362006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10637
10638 * Makefile.in (clean): Remove reg-mips64.c.
10639 (reg-mips64.c, reg-mips64.o): New rules.
10640 * configure.srv: Handle mips64. Include regset support for mips.
10641 * linux-mips-low.c (union mips_register): New.
10642 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10643 (mips_breakpoint, mips_breakpoint_at): Use int.
10644 (mips_collect_register, mips_supply_register)
10645 (mips_collect_register_32bit, mips_supply_register_32bit)
10646 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10647 (mips_store_fpregset, target_regsets): New.
10648 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10649
a13e2c95
UW
106502006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10651
10652 * configure.srv: Add target "spu*-*-*".
10653 * Makefile.in (clean): Remove reg-spu.c.
10654 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10655 * spu-low.c: New file.
10656
cb7283db
DJ
106572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10658
10659 * configure.ac: Correct td_thr_tls_get_addr test.
10660 * configure: Regenerated.
10661
89be2091
DJ
106622006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10663
10664 * linux-low.c (linux_wait_for_event): Reformat. Use the
10665 pass_signals array.
10666 * remote-utils.c (decode_address_to_semicolon): New.
10667 * server.c (pass_signals, handle_general_set): New.
10668 (handle_query): Mention QPassSignals for qSupported.
10669 (main): Call handle_general_set.
10670 * server.h (pass_signals, decode_address_to_semicolon): New.
10671
000ef4f0
DJ
106722006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10673
10674 * server.c (handle_query): Correct error handling for read_auxv.
10675
b7149293
UW
106762005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10677
10678 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10679 and srv_linux_thread_db to yes.
10680 * linux-s390-low.c (s390_fill_gregset): New function.
10681 (target_regsets): Define data structure.
10682
dae5f5cf
DJ
106832006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10684
10685 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10686 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10687 * config.in, configure: Regenerated.
10688 * inferiors.c (gdb_id_to_thread): New function.
10689 (gdb_id_to_thread_id): Use it.
10690 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10691 * linux-low.h (struct process_info): Add th member.
10692 (thread_db_get_tls_address): New prototype.
10693 * remote-utils.c (decode_address): Make non-static.
10694 * server.c (handle_query): Handle qGetTLSAddr.
10695 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10696 * target.h (struct target_ops): Add get_tls_address.
10697 * thread-db.c (maybe_attach_thread): Save the thread handle.
10698 (thread_db_get_tls_address): New.
10699
32ca6d61
DJ
107002006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10701
10702 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10703 (linux_resume_one_process): Take a siginfo_t *. Update all
10704 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10705 (struct pending_signals): Add a siginfo_t.
10706 (linux_wait_for_process): Always set last_status.
10707 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10708 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10709 * linux-low.h (struct process_info): Add last_status.
10710
5ffff7c1
DJ
107112006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10712
10713 * remote-utils.c (try_rle): New function.
10714 (putpkt_binary): Use it.
10715
8695c747
DJ
107162006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10719 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10720 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10721 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10722 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10723 point registers.
10724
290fadea
RS
107252006-08-08 Richard Sandiford <richard@codesourcery.com>
10726
10727 * server.c (terminal_fd): New variable.
10728 (old_foreground_pgrp): Likewise.
10729 (restore_old_foreground_pgrp): New function.
10730 (start_inferior): Record the terminal file descriptor in terminal_fd
10731 and its original foreground group in old_foreground_pgrp. Register
10732 restore_old_foreground_pgrp with atexit().
10733
9f2e1e63
DJ
107342006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10735
10736 * server.c (handle_query): Correct qPart to qXfer.
10737
b80864fb
DJ
107382006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10739
10740 * configure.ac: Check for more headers which are missing on
10741 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10742 * configure.srv: Add Cygwin and mingw32.
10743 * remote-utils.c: Don't include headers unconditionally which
10744 are missing on mingw32. Include <winsock.h> for mingw32.
10745 (remote_open): Adjust for mingw32 support. Flush
10746 standard error after writing to it.
10747 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10748 (unblock_async_io, enable_async_io, disable_async_io)
10749 (readchar, getpkt): Update for Winsock support.
10750 (prepare_resume_reply): Expect a protocol signal number.
10751 * server.c: Disable <sys/wait.h> on mingw32.
10752 (start_inferior): Adjust for mingw32 support. Flush
10753 standard error after writing to it.
10754 (attach_inferior): Likewise. Use protocol signal
10755 numbers.
10756 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10757 and names.
10758 * win32-i386-low.c: New file.
10759 * Makefile.in (XM_CLIBS): Set.
10760 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10761 (win32-i386-low.o): New dependency rule.
10762 * linux-low.c (linux_wait): Use target signal numbers.
10763 * target.h (struct target_ops): Doc fix.
10764 * server.h (target_signal_to_name): New prototype.
10765 * gdbreplay.c: Don't include headers unconditionally which
10766 are missing on mingw32. Include <winsock.h> for mingw32.
10767 (remote_close, remote_open): Adjust for Winsock support.
10768 * configure, config.in: Regenerated.
10769
0876f84a
DJ
107702006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10771
10772 * server.c (decode_xfer_read, write_qxfer_response): New.
10773 (handle_query): Take a packet length argument. Handle
10774 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10775 the qSupported response.
10776 (main): Update call to handle_query.
10777
01f9e8fa
DJ
107782006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10779
10780 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10781 (putpkt_binary): Renamed from putpkt and adjusted for binary
10782 data.
10783 (putpkt): New wrapper for putpkt_binary.
10784 (readchar): Don't mask off the high bit.
10785 (decode_X_packet): New function.
10786 * server.c (main): Call putpkt_binary if a handler sets the packet
10787 length. Save the length of the incoming packet. Handle 'X'.
10788 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10789
be2a5f71
DJ
107902006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * server.c (handle_query): Handle qSupported.
10793
ea025f5f
DJ
107942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10795
10796 * remote-utils.c (all_symbols_looked_up): New variable.
10797 (look_up_one_symbol): Check it.
10798 * server.h (look_up_one_symbol): New declaration.
10799 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10800
9308fc88
DJ
108012006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10802
10803 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10804 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10805 (PTRACE_GET_THREAD_AREA): Define.
10806 (ps_get_thread_area): New function.
10807
52fb6437
NS
108082006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10809
10810 * configure.srv (m68k*-*-uclinux*): New target.
10811 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10812 (linux_resume_one_process): Remove extraneous cast.
10813 (linux_read_offsets): New.
10814 (linux_target_op): Add linux_read_offsets on mmuless systems.
10815 * server.c (handle_query): Add qOffsets logic.
10816 * target.h (struct target_ops): Add read_offsets.
10817
21b0f40c
DJ
108182006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10819
10820 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10821 (PTRACE_GET_THREAD_AREA): Define.
10822 (ps_get_thread_area): New function.
10823 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10824 (linux-x86-64-low.o): Update.
10825
0050a760
DJ
108262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * configure.ac: Remove checks for prfpregset_t.
10829 * gdb_proc_service.h: New file.
10830 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10831 new "gdb_proc_service.h".
10832 * proc-service.c: Likewise.
10833 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10834 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10835 * Makefile.in (gdb_proc_service_h): Updated.
10836 * configure, config.in: Regenerated.
10837
b92a518e
DJ
108382006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10839
10840 * remote-utils.c (prepare_resume_reply): Move declaration
10841 of gdb_id_from_wait to the top of the block.
10842
545587ee
DJ
108432006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10844
10845 * linux-low.c (regsets_store_inferior_registers): Read the regset
10846 from the target before filling it.
10847
9db87ebd
DJ
108482006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10849
10850 * server.c (attach_inferior): Return SIGTRAP for a successful
10851 attach.
10852
dd24457d
DJ
108532006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10854
10855 * Makefile.in (OBS): Add version.o.
10856 (STAGESTUFF): Delete.
10857 (version.o): Add dependencies.
10858 (version.c): Replace rule.
10859 (clean): Remove version.c.
10860 * server.c (gdbserver_version): New.
10861 (gdbserver_usage): Use printf.
10862 (main): Handle --version and --help.
10863 * server.h (version, host_name): Add declarations.
10864
6f0f660e
EZ
108652005-12-23 Eli Zaretskii <eliz@gnu.org>
10866
889bf7c5
PA
10867 * linux-arm-low.c:
10868 * linux-arm-low.c:
10869 * inferiors.c:
10870 * i387-fp.h:
10871 * i387-fp.c:
10872 * gdbreplay.c:
10873 * regcache.c:
10874 * proc-service.c:
10875 * mem-break.h:
10876 * mem-break.c:
10877 * linux-x86-64-low.c:
10878 * linux-sh-low.c:
10879 * linux-s390-low.c:
10880 * linux-ppc64-low.c:
10881 * linux-ppc-low.c:
10882 * linux-mips-low.c:
10883 * linux-m68k-low.c:
10884 * linux-m32r-low.c:
10885 * linux-low.h:
10886 * linux-low.c:
10887 * linux-ia64-low.c:
10888 * linux-i386-low.c:
10889 * linux-crisv32-low.c:
10890 * thread-db.c:
10891 * terminal.h:
10892 * target.h:
10893 * target.c:
10894 * server.h:
10895 * server.c:
10896 * remote-utils.c:
10897 * regcache.h:
10898 * utils.c:
10899 * Makefile.in:
10900 * configure.ac:
6f0f660e
EZ
10901 * gdbserver.1: Add (C) after Copyright. Update the FSF
10902 address.
10903
9d1fb177
DJ
109042005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10905
10906 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10907 (arm_breakpoint_at): Recognize both breakpoints.
10908 (the_low_target): Use the correct breakpoint instruction.
10909
011a70c2
DJ
109102005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10911
10912 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10913 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10914 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10915 (the_low_target): Update.
10916
7fb85e41
AS
109172005-10-25 Andreas Schwab <schwab@suse.de>
10918
10919 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10920
10921 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10922 (ia64_num_regs): Reduce to 462.
10923
3db0444b
DJ
109242005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10925
10926 * acinclude.m4: Correct quoting.
10927 * aclocal.m4: Regenerated.
10928
10929 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10930 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10931 (thread_db_init): Call thread_db_err_str.
10932 * configure.ac: Check for TD_VERSION.
10933 * config.in, configure: Regenerated.
10934
bee0189a
DJ
109352005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10936
10937 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10938
e9d25b98
DJ
109392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10942 is not available. Define HAVE_PTRACE_GETREGS if it is.
10943 * config.in, configure: Regenerated.
10944 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10945 * linux-i386-low.c, linux-m68k-low.c: Update to use
10946 HAVE_PTRACE_GETREGS.
10947 * linux-low.c (regsets_fetch_inferior_registers)
10948 (regsets_store_inferior_registers): Only return 0 if we processed
10949 GENERAL_REGS.
10950 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10951 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10952
a06660f7
DJ
109532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10954
10955 * inferiors.c (struct thread_info): Add gdb_id.
10956 (add_thread): Add gdb_id argument.
10957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10958 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10959 calls to add_thread.
10960 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10961 * server.c (handle_query): Use thread_to_gdb_id.
10962 (handle_v_cont, main): Use gdb_id_to_thread_id.
10963 * server.h (add_thread): Update prototype.
10964 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10965 prototypes.
10966
5a1f5858
DJ
109672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10968
10969 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10970 left-padded registers.
10971 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10972 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10973
e122f1f5
SE
109742005-07-01 Steve Ellcey <sje@cup.hp.com>
10975
10976 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10977 * configure: Regenerate.
10978 * config.in: Regenerate.
10979 * server.h (NEED_DECLARATION_STRERROR):
10980 Replace with !HAVE_DECL_STRERROR.
10981
d592fa2f
DJ
109822005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10983
10984 * linux-low.c (linux_wait, linux_send_signal): Don't test
10985 an unsigned long variable for > 0 if it could be MAX_ULONG.
10986 * server.c (myresume): Likewise.
10987 * target.c (set_desired_inferior): Likewise.
10988
ccbd4912
MK
109892005-06-13 Mark Kettenis <kettenis@gnu.org>
10990
10991 * configure.ac: Simplify and improve check for socklen_t.
10992 * configure, config.in: Regenerate.
10993
f450004a
DJ
109942005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10995
10996 * acconfig.h: Remove.
10997 * configure.ac: Add a test for socklen_t. Use three-argument
10998 AC_DEFINE throughout.
10999 * config.in: Regenerated using autoheader 2.59.
11000 * configure: Regenerated.
11001
11002 * gdbreplay.c (socklen_t): Provide a default.
11003 (remote_open): Use socklen_t.
11004 * remote-utils.c (socklen_t): Provide a default.
11005 (remote_open): Use socklen_t.
11006 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11007 unsigned char.
11008
11009 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11010 char for buffers.
11011 * linux-low.c (linux_read_memory, linux_write_memory)
11012 (linux_read_auxv): Likewise.
11013 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11014 (check_mem_write): Likewise.
11015 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11016 Likewise.
11017 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11018 (registers_from_string, register_data): Likewise.
11019 * server.c (handle_query, main): Likewise.
11020 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11021 (decode_M_packet): Likewise.
11022 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11023 * target.h (struct target_ops): Update read_memory, write_memory,
11024 and read_auxv.
11025 (read_inferior_memory, write_inferior_memory): Update.
11026 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11027 to unsigned char *.
11028 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11029 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11030 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11031 linux-s390-low.c, linux-sh-low.c: Update for changes in
11032 read_inferior_memory and the_low_target->breakpoint.
11033
eee84df1
DJ
110342005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11037 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11038 * configure.srv: Add powerpc64-*-linux*.
11039 * linux-ppc64-low.c: New file.
11040
45b134e5
OF
110412005-05-23 Orjan Friberg <orjanf@axis.com>
11042
11043 * linux-cris-low.c: New file with support for CRIS.
11044 * linux-crisv32-low.c: Ditto for CRISv32.
11045 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11046 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11047 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11048 reg-crisv32.o, and reg-crisv32.c to make rules.
11049 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11050 recognized targets.
11051
48d93c75
UW
110522005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11053
11054 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11055 of sizeof (PTRACE_XFER_TYPE).
11056 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11057
e013ee27
OF
110582005-05-12 Orjan Friberg <orjanf@axis.com>
11059
889bf7c5 11060 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11061 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11062 pointers for hardware watchpoint support.
11063 * linux-low.h (struct linux_target_ops): Ditto.
11064 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11065 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11066 to linux_target_ops.
11067 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11068 reply packet.
11069 * server.c (main): Recognize 'Z' and 'z' packets.
11070
b0ded00b
UW
110712005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11072
11073 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11074 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11075 (the_low_target): Add new members.
11076
8643e2ad
DJ
110772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11078
11079 * proc-service.c (ps_lgetregs): Search all_processes instead of
11080 all_threads.
11081
fc620387
DJ
110822005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11083
11084 * server.c (start_inferior): Change return type to int.
11085 (attach_inferior): Change sigptr to int *.
11086 (handle_v_cont, handle_v_requests): Change signal to int *.
11087 (main): Change signal to int.
11088
110892005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11090
11091 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11092 * configure.srv: Add m32r*-*-linux*.
11093 * linux-m32r-low.c: New file.
11094
e0e76420
DJ
110952005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11096
11097 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11098
a1928bad
DJ
110992005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11100
11101 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11102 Take unsigned long arguments for PIDs.
11103 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11104 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11105 (wait_for_sigstop, linux_resume_one_process)
11106 (regsets_fetch_inferior_registers, linux_send_signal)
11107 (linux_read_auxv): Likewise. Update the types of variables holding
11108 PIDs. Update format string specifiers.
11109 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11110 * remote-utils.c (prepare_resume_reply): Likewise.
11111 * server.c (cont_thread, general_thread, step_thread)
11112 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11113 unsigned long.
11114 (handle_query): Update format specifiers.
11115 (handle_v_cont, main): Use strtoul for thread IDs.
11116 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11117 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11118 (general_thread, step_thread, thread_from_wait)
11119 (old_thread_from_wait): Update.
11120 * target.h (struct thread_resume): Use unsigned long for THREAD.
11121 (struct target_ops): Use unsigned long for arguments to attach and
11122 thread_alive.
11123
dcdb98d2
DJ
111242005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11125
11126 * acinclude.m4: Include bfd/bfd.m4 directly.
11127 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11128 <agriffis@toolchain.org>.
11129 * aclocal.m4, configure: Regenerated.
11130
bec39cab
AC
111312005-01-07 Andrew Cagney <cagney@gnu.org>
11132
11133 * configure.ac: Rename configure.in, require autoconf 2.59.
11134 * configure: Re-generate.
11135
434c4c77
DJ
111362004-12-08 Daniel Jacobowitz <dan@debian.org>
11137
11138 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11139 LIBS when finished.
11140 * aclocal.m4: Regenerated.
11141 * configure: Regenerated.
11142
db1d3e1b
AS
111432004-11-21 Andreas Schwab <schwab@suse.de>
11144
11145 * linux-m68k-low.c (m68k_num_gregs): Define.
11146 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11147 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11148 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11149 (m68k_breakpoint_at): New. Add to the_low_target.
11150
11151 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11152 srv_linux_thread_db to yes.
11153
43360365
JB
111542004-10-20 Joel Brobecker <brobecker@gnat.com>
11155
11156 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11157 (ARCH_SET_FS): Likewise.
11158 (ARCH_GET_FS): Likewise.
11159 (ARCH_GET_GS): Likewise.
11160
fd500816
DJ
111612004-10-16 Daniel Jacobowitz <dan@debian.org>
11162
11163 * linux-i386-low.c (ps_get_thread_area): New.
11164 * linux-x86-64-low.c (ps_get_thread_area): New.
11165 * linux-low.c: Include <sys/syscall.h>.
11166 (linux_kill_one_process): Don't kill the first thread here.
11167 (linux_kill): Kill the first thread here.
11168 (kill_lwp): New function.
11169 (send_sigstop, linux_send_signal): Use it.
11170 * proc-service.c: Clean up #ifdefs.
11171 (fpregset_info): Delete.
11172 (ps_lgetregs): Update and enable implementation.
11173 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11174 implementations.
11175 * remote-utils.c (struct sym_cache, symbol_cache): New.
11176 (input_interrupt): Print a clearer message.
11177 (async_io_enabled): New variable.
11178 (enable_async_io, disable_async_io): Use it. Update comments.
11179 (look_up_one_symbol): Use the symbol cache.
11180 * thread-db.c (thread_db_look_up_symbols): New function.
11181 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11182
f6de3c42
DJ
111832004-10-16 Daniel Jacobowitz <dan@debian.org>
11184
11185 * configure.in: Test for -rdynamic.
11186 * configure: Regenerated.
11187 * Makefile (INTERNAL_LDFLAGS): New.
11188 (gdbserver, gdbreplay): Use it.
11189
2c0fc042
AC
111902004-09-02 Andrew Cagney <cagney@gnu.org>
11191
11192 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11193
075b3282
DJ
111942004-03-23 Daniel Jacobowitz <drow@mvista.com>
11195
11196 * linux-low.c (linux_wait): Clear all_processes list also.
11197
fa6a77dc
DJ
111982004-03-12 Daniel Jacobowitz <drow@mvista.com>
11199
11200 * linux-low.c: Include <errno.h>. Remove extern declaration of
11201 errno.
11202
6d782a97
DJ
112032004-03-12 Daniel Jacobowitz <drow@mvista.com>
11204
11205 * gdbreplay.c, server.h, utils.c: Update copyright years.
11206
3a7fb99b
DJ
112072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11208
11209 * server.c (main): Print child status or termination signal from
11210 variable 'signal', not 'sig'.
11211
c3e735a6
DJ
112122004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11213
11214 * linux-low.c (linux_read_memory): Change return type to
11215 int. Check for and return error from ptrace().
11216 * target.c (read_inferior_memory): Change return type to int. Pass
11217 back return status from the_target->read_memory().
11218 * target.h (struct target_ops): Adapt *read_memory() prototype.
11219 Update comment.
11220 (read_inferior_memory): Adapt prototype.
11221 * server.c (main): Return an error packet if
11222 read_inferior_memory() returns an error.
11223
a59d1c82
DJ
112242004-03-04 Daniel Jacobowitz <drow@mvista.com>
11225
11226 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11227 Unify with other clean targets.
11228
dc3f8883
DJ
112292004-02-29 Daniel Jacobowitz <drow@mvista.com>
11230
11231 * server.c (handle_v_cont): Call set_desired_inferior.
11232
89a208da
DJ
112332004-02-29 Daniel Jacobowitz <drow@mvista.com>
11234
11235 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11236
62ea82f5
DJ
112372004-02-29 Daniel Jacobowitz <drow@mvista.com>
11238
11239 * linux-low.c (linux_wait): Unblock async I/O.
11240 (linux_resume): Block and enable async I/O.
11241 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11242 * server.h (block_async_io, unblock_async_io): Add prototypes.
11243
6910d122
DJ
112442004-02-29 Daniel Jacobowitz <drow@mvista.com>
11245
11246 * remote-utils.c (remote_open): Print a status notice after
11247 opening a TCP port.
11248 * server.c (attach_inferior): Print a status notice after
11249 attaching.
11250
112512004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11252
11253 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11254
c89dc5d4
DJ
112552004-02-26 Daniel Jacobowitz <drow@mvista.com>
11256
11257 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11258 error packet.
11259 * server.c, target.h: Update copyright years.
11260
4b8dad4a
RM
112612004-02-25 Roland McGrath <roland@redhat.com>
11262
11263 * target.h (struct target_ops): New member `read_auxv'.
11264 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11265 * linux-low.c (linux_read_auxv): New function.
11266 (linux_target_ops): Initialize `read_auxv' member to that.
11267
d7446758
JB
112682004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11269
11270 Committed by Jim Blandy <jimb@redhat.com>.
11271
11272 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11273 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11274 instead of GPR_SIZE to distiguish s390 and s390x targets.
11275
5544ad89
DJ
112762004-01-31 Daniel Jacobowitz <drow@mvista.com>
11277
11278 * linux-low.c: Update copyright year.
11279 (check_removed_breakpoint): Clear pending_is_breakpoint.
11280 (linux_set_resume_request, linux_queue_one_thread)
11281 (resume_status_pending_p): New functions.
11282 (linux_continue_one_thread): Use process->resume.
11283 (linux_resume): Only resume threads if there are no pending events.
11284 * linux-low.h (struct process_info): Add resume request
11285 pointer.
11286
2a68b70e
DJ
112872004-01-30 Daniel Jacobowitz <drow@mvista.com>
11288
11289 * regcache.c (new_register_cache): Clear the allocated register
11290 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11291
64386c31
DJ
112922003-10-13 Daniel Jacobowitz <drow@mvista.com>
11293
11294 * linux-low.c (linux_resume): Take a struct thread_resume *
11295 argument.
11296 (linux_wait): Update call.
11297 (resume_ptr): New static variable.
11298 (linux_continue_one_thread): Renamed from
11299 linux_continue_one_process. Use resume_ptr.
11300 (linux_resume): Use linux_continue_one_thread.
11301 * server.c (handle_v_cont, handle_v_requests): New functions.
11302 (myresume): New function.
11303 (main): Handle 'v' case.
11304 * target.h (struct thread_resume): New type.
11305 (struct target_ops): Change argument of "resume" to struct
11306 thread_resume *.
11307 (myresume): Delete macro.
11308
c938e9b0
L
113092003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11310
11311 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11312 (uninstall): Support DESTDIR.
11313
7f313d07
BC
11314Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11315
11316 * configure.srv: Add xscale*linux copy of arm*linux entry.
11317
3b2fc2ea
DJ
113182003-07-24 Daniel Jacobowitz <drow@mvista.com>
11319
11320 * linux-arm-low.c (arm_reinsert_addr): New function.
11321 (the_low_target): Add arm_reinsert_addr.
11322
1c0a559e
MK
113232003-07-08 Mark Kettenis <kettenis@gnu.org>
11324
11325 * mem-break.c: Remove whitespace at end of file.
11326
43d5792c
DJ
113272003-06-28 Daniel Jacobowitz <drow@mvista.com>
11328
11329 * configure.in: Check whether we need to prototype strerror.
11330 * server.h: Optionally prototype strerror.
11331 * gdbreplay.c (perror_with_name): Use strerror.
11332 * linux-low.c (linux_attach_lwp): Use strerror.
11333 * utils.c (perror_with_name): Use strerror.
11334 * config.in, configure: Regenerated.
11335
c8a86edf
DJ
113362003-06-28 Daniel Jacobowitz <drow@mvista.com>
11337
11338 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11339 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11340
73d37363
DJ
113412003-06-20 Daniel Jacobowitz <drow@mvista.com>
11342
11343 * Makefile.in (SFILES): Update.
11344 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11345 low-sun3.c: Remove files.
11346
6ad8ae5c
DJ
113472003-06-17 Daniel Jacobowitz <drow@mvista.com>
11348
11349 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11350 (linux_detach_one_process, linux_detach): New functions.
11351 (linux_target_ops): Add linux_detach.
11352 * server.c (main): Handle 'D' packet.
11353 * target.h (struct target_ops): Add "detach" member.
11354 (detach_inferior): Define.
11355
1581182a
MK
113562003-06-13 Mark Kettenis <kettenis@gnu.org>
11357
11358 From Kelley Cook <kelleycook@wideopenwest.com>:
11359 * configure.srv: Accept i[34567]86 variants.
11360
e5379b03
DJ
113612003-06-05 Daniel Jacobowitz <drow@mvista.com>
11362
11363 * linux-low.c (linux_wait_for_event): Correct comment typos.
11364 (linux_resume_one_process): Call check_removed_breakpoint.
11365 (linux_send_signal): New function.
11366 (linux_target_ops): Add linux_send_signal.
11367 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11368 of kill.
11369 * target.h (struct target_ops): Add send_signal.
11370
2ff29de4
JB
113712003-05-29 Jim Blandy <jimb@redhat.com>
11372
11373 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11374 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11375 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11376 away part of the register's value.
11377
254787d4
DJ
113782003-03-26 Daniel Jacobowitz <drow@mvista.com>
11379
11380 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11381 (linux_wait_for_event, linux_init_signals): Likewise.
11382
94e10508
DJ
113832003-03-17 Daniel Jacobowitz <drow@mvista.com>
11384
11385 * configure.in: Check for stdlib.h.
11386 * configure: Regenerated.
11387 * config.in: Regenerated.
11388
4c0711e0
DJ
113892003-01-04 Andreas Schwab <schwab@suse.de>
11390
11391 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11392
ef66e766
AC
113932003-01-02 Andrew Cagney <ac131313@redhat.com>
11394
11395 * Makefile.in: Remove obsolete code.
11396
a1358604
DJ
113972002-11-20 Daniel Jacobowitz <drow@mvista.com>
11398
11399 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11400 defined(PT_FPR0_HI).
11401
23ce3b1c
DJ
114022002-11-17 Stuart Hughes <seh@zee2.com>
11403
11404 * linux-arm-low.c (arm_num_regs): Increase.
11405 (arm_regmap): Include status register.
11406
114072002-11-17 Daniel Jacobowitz <drow@mvista.com>
11408
11409 * linux-low.c (register_addr): Remove incorrect -1 check.
11410
a9fa9f7d
DJ
114112002-08-29 Daniel Jacobowitz <drow@mvista.com>
11412
11413 * linux-low.c (linux_create_inferior): Call setpgid. Return
11414 the new PID.
11415 (unstopped_p, linux_signal_pid): Remove.
11416 (linux_target_ops): Remove linux_signal_pid.
11417 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11418 global instead of target method.
11419 * target.h (struct target_ops): Remove signal_pid. Update comment
11420 for create_inferior.
11421 * server.c (signal_pid): New variable.
11422 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11423 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11424 (attach_inferior): Set signal_pid.
11425
17574093
DJ
114262002-08-23 Daniel Jacobowitz <drow@mvista.com>
11427
11428 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11429
114302002-08-20 Jim Blandy <jimb@redhat.com>
11431
11432 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11433 default for this.
11434
114352002-08-01 Andrew Cagney <cagney@redhat.com>
11436
11437 * Makefile.in: Make chill references obsolete.
11438
114392002-07-24 Kevin Buettner <kevinb@redhat.com>
11440
11441 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11442 * configure: Regenerate.
11443 * config.in: Regenerate.
11444
114452002-07-09 David O'Brien <obrien@FreeBSD.org>
11446
11447 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11448 (perror_with_name, remote_close, remote_open, expect, play): Static.
11449
114502002-07-04 Michal Ludvig <mludvig@suse.cz>
11451
4b8dad4a 11452 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11453 byte offsets instead of an array of indexes.
11454 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11455
114562002-06-13 Daniel Jacobowitz <drow@mvista.com>
11457
11458 * regcache.c: Add comment.
11459
114602002-06-11 Daniel Jacobowitz <drow@mvista.com>
11461
11462 * thread-db.c: New file.
11463 * proc-service.c: New file.
11464 * acinclude.m4: New file.
11465 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11466 proc-service.o, and thread-db.o.
11467 (linux-low.o): Add USE_THREAD_DB.
11468 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11469 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11470 * aclocal.m4: Regenerated.
11471 * config.in: Regenerated.
11472 * configure: Regenerated.
11473 * configure.in: Check for proc_service.h, sys/procfs.h,
11474 thread_db.h, and linux/elf.h headrs.
11475 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11476 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11477 Check for -lthread_db and thread support.
11478 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11479 PowerPC, and SuperH.
11480 * i387-fp.c: Constify arguments.
11481 * i387-fp.h: Likewise.
11482 * inferiors.c: (struct thread_info): Renamed from
11483 `struct inferior_info'. Remove PID member. Use generic inferior
11484 list header. All uses updated.
11485 (inferiors, signal_pid): Removed.
11486 (all_threads): New variable.
11487 (get_thread): Define.
11488 (add_inferior_to_list): New function.
11489 (for_each_inferior): New function.
11490 (change_inferior_id): New function.
11491 (add_inferior): Removed.
11492 (remove_inferior): New function.
11493 (add_thread): New function.
11494 (free_one_thread): New function.
11495 (remove_thread): New function.
11496 (clear_inferiors): Use for_each_inferior and free_one_thread.
11497 (find_inferior): New function.
11498 (find_inferior_id): New function.
11499 (inferior_target_data): Update argument type.
11500 (set_inferior_target_data): Likewise.
11501 (inferior_regcache_data): Likewise.
11502 (set_inferior_regcache_data): Likewise.
11503 * linux-low.c (linux_bp_reinsert): Remove.
11504 (all_processes, stopping_threads, using_thrads)
11505 (struct pending_signals, debug_threads, pid_of): New.
11506 (inferior_pid): Replace with macro.
11507 (struct inferior_linux_data): Remove.
11508 (get_stop_pc, add_process): New functions.
11509 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11510 Use add_process and add_thread.
11511 (linux_attach_lwp): New function, based on old linux_attach. Use
11512 add_process and add_thread. Set stop_expected for new threads.
11513 (linux_attach): New function.
11514 (linux_kill_one_process): New function.
11515 (linux_kill): Kill all LWPs.
11516 (linux_thread_alive): Use find_inferior_id.
11517 (check_removed_breakpoints, status_pending_p): New functions.
11518 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11519 Update. Use WNOHANG. Wait for cloned processes also. Update process
11520 struct for the found process.
11521 (linux_wait_for_event): New function.
11522 (linux_wait): Use it. Support LWPs.
11523 (send_sigstop, wait_for_sigstop, stop_all_processes)
11524 (linux_resume_one_process, linux_continue_one_process): New functions.
11525 (linux_resume): Support LWPs.
11526 (REGISTER_RAW_SIZE): Remove.
11527 (fetch_register): Use register_size instead. Call supply_register.
11528 (usr_store_inferior_registers): Likewise. Call collect_register.
11529 Fix recursive case.
11530 (regsets_fetch_inferior_registers): Improve error message.
11531 (regsets_store_inferior_registers): Add debugging.
11532 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11533 (unstopped_p, linux_signal_pid): New functions.
11534 (linux_target_ops): Add linux_signal_pid.
11535 (linux_init_signals): New function.
11536 (initialize_low): Call it. Initialize using_threads.
11537 * regcache.c (inferior_regcache_data): Add valid
11538 flag.
11539 (get_regcache): Fetch registers lazily. Add fetch argument
11540 and update all callers.
11541 (regcache_invalidate_one, regcache_invalidate): New
11542 functions.
11543 (new_register_cache): Renamed from create_register_cache.
11544 Return the new regcache.
11545 (free_register_cache): Change argument to a void *.
11546 (registers_to_string, registers_from_string): Call get_regcache
11547 with fetch flag set.
11548 (register_data): Make static. Pass fetch flag to get_regcache.
11549 (supply_register): Call get_regcache with fetch flag clear.
11550 (collect_register): Call get_regcache with fetch flag set.
11551 (collect_register_as_string): New function.
11552 * regcache.h: Update.
11553 * remote-utils.c (putpkt): Flush after debug output and use
11554 stderr.
11555 Handle input interrupts while waiting for an ACK.
11556 (input_interrupt): Use signal_pid method.
11557 (getpkt): Flush after debug output and use stderr.
11558 (outreg): Use collect_register_as_string.
11559 (new_thread_notify, dead_thread_notify): New functions.
11560 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11561 and general_thread.
11562 (look_up_one_symbol): Flush after debug output.
11563 * server.c (step_thread, server_waiting): New variables.
11564 (start_inferior): Don't use signal_pid. Update call to mywait.
11565 (attach_inferior): Update call to mywait.
11566 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11567 (main): Don't fetch/store registers explicitly. Use
11568 set_desired_inferior. Support proposed ``Hs'' packet. Update
11569 calls to mywait.
11570 * server.h: Update.
11571 (struct inferior_list, struct_inferior_list_entry): New.
11572 * target.c (set_desired_inferior): New.
11573 (write_inferior_memory): Constify.
11574 (mywait): New function.
11575 * target.h: Update.
11576 (struct target_ops): New signal_pid method.
11577 (mywait): Removed macro, added prototype.
11578
11579 * linux-low.h (regset_func): Removed.
11580 (regset_fill_func, regset_store_func): New.
11581 (enum regset_type): New.
11582 (struct regset_info): Add type field. Use new operation types.
11583 (struct linux_target_ops): stop_pc renamed to get_pc.
11584 Add decr_pc_after_break and breakpoint_at.
11585 (get_process, get_thread_proess, get_process_thread)
11586 (strut process_info, all_processes, linux_attach_lwp)
11587 (thread_db_init): New.
11588
11589 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11590 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11591 (the_low_target): Add new members.
11592 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11593 (i386_store_fpxregset): Constify.
11594 (target_regsets): Add new kind identifier.
11595 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11596 (i386_set_pc): Add debugging.
11597 (i386_breakpoint_at): New function.
11598 (the_low_target): Add new members.
11599 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11600 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11601 (mips_breakpoint_at): New.
11602 (the_low_target): Add new members.
11603 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11604 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11605 (the_low_target): Add new members.
11606 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11607 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11608 (the_low_target): Add new members.
11609 * linux-x86-64-low.c (target_regsets): Add new kind
11610 identifier.
11611
116122002-05-15 Daniel Jacobowitz <drow@mvista.com>
11613
11614 From Martin Pool <mbp@samba.org>:
11615 * server.c (gdbserver_usage): New function.
11616 (main): Call it.
11617
116182002-05-14 Daniel Jacobowitz <drow@mvista.com>
11619
11620 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11621 stop_at -> stop_pc.
11622
116232002-05-04 Andrew Cagney <ac131313@redhat.com>
11624
11625 * Makefile.in: Remove obsolete code.
11626
116272002-04-24 Michal Ludvig <mludvig@suse.cz>
11628
11629 * linux-low.c (regsets_fetch_inferior_registers),
11630 (regsets_store_inferior_registers): Removed cast to int from
11631 ptrace() calls.
11632 * regcache.h: Added declaration of struct inferior_info.
11633
116342002-04-20 Daniel Jacobowitz <drow@mvista.com>
11635
11636 * inferiors.c (struct inferior_info): Add regcache_data.
11637 (add_inferior): Call create_register_cache.
11638 (clear_inferiors): Call free_register_cache.
11639 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11640 * regcache.c (struct inferior_regcache_data): New.
11641 (registers): Remove.
11642 (get_regcache): New function.
11643 (create_register_cache, free_register_cache): New functions.
11644 (set_register_cache): Don't initialize the register cache here.
11645 (registers_to_string, registers_from_string, register_data): Call
11646 get_regcache.
11647 * regcache.h: Add prototypes.
11648 * server.h: Likewise.
11649
116502002-04-20 Daniel Jacobowitz <drow@mvista.com>
11651
11652 * mem-break.c: New file.
11653 * mem-break.h: New file.
11654 * Makefile.in: Add mem-break.o rule; update server.h
11655 dependencies.
11656 * inferiors.c (struct inferior_info): Add target_data
11657 member.
11658 (clear_inferiors): Free target_data member if set.
11659 (inferior_target_data, set_inferior_target_data): New functions.
11660 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11661 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11662 * linux-low.c (linux_bp_reinsert): New variable.
11663 (struct inferior_linux_data): New.
11664 (linux_create_inferior): Use set_inferior_target_data.
11665 (linux_attach): Likewise. Call add_inferior.
11666 (linux_wait_for_one_inferior): New function.
11667 (linux_wait): Call it.
11668 (linux_write_memory): Add const.
11669 (initialize_low): Call set_breakpoint_data.
11670 * linux-low.h (struct linux_target_ops): Add breakpoint
11671 handling members.
11672 * server.c (attach_inferior): Remove extra add_inferior
11673 call.
11674 * server.h: Include mem-break.h. Update inferior.c
11675 prototypes.
11676 * target.c (read_inferior_memory)
11677 (write_inferior_memory): New functions.
11678 * target.h (read_inferior_memory)
11679 (write_inferior_memory): Change macros to prototypes.
11680 (struct target_ops): Update comments. Add const to write_memory
11681 definition.
11682
116832002-04-11 Daniel Jacobowitz <drow@mvista.com>
11684
11685 * linux-low.c (usr_store_inferior_registers): Support
11686 registers which are allowed to fail to store.
11687 * linux-low.h (linux_target_ops): Likewise.
11688 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11689 (ppc_cannot_store_register): FPSCR may not be storable.
11690
116912002-04-09 Daniel Jacobowitz <drow@mvista.com>
11692
11693 * server.h: Include <string.h> if HAVE_STRING_H.
11694 * ChangeLog: Correct paths in last ChangeLog entry.
11695
116962002-04-09 Daniel Jacobowitz <drow@mvista.com>
11697
11698 * linux-low.h: Remove obsolete prototypes.
11699 (struct linux_target_ops): New.
11700 (extern the_low_target): New.
11701 * linux-low.c (num_regs, regmap): Remove declarations.
11702 (register_addr): Use the_low_target explicitly.
11703 (fetch_register): Likewise.
11704 (usr_fetch_inferior_registers): Likewise.
11705 (usr_store_inferior_registers): Likewise.
11706 * linux-arm-low.c (num_regs): Remove.
11707 (arm_num_regs): Define.
11708 (arm_regmap): Renamed from regmap, made static.
11709 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11710 made static.
11711 (arm_cannot_store_register): Renamed from cannot_store_register,
11712 made static.
11713 (the_low_target): New.
11714 * linux-i386-low.c (num_regs): Remove.
11715 (i386_num_regs): Define.
11716 (i386_regmap): Renamed from regmap, made static.
11717 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11718 made static.
11719 (i386_cannot_store_register): Renamed from cannot_store_register,
11720 made static.
11721 (the_low_target): New.
11722 * linux-ia64-low.c (num_regs): Remove.
11723 (ia64_num_regs): Define.
11724 (ia64_regmap): Renamed from regmap, made static.
11725 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11726 made static.
11727 (ia64_cannot_store_register): Renamed from cannot_store_register,
11728 made static.
11729 (the_low_target): New.
11730 * linux-m68k-low.c (num_regs): Remove.
11731 (m68k_num_regs): Define.
11732 (m68k_regmap): Renamed from regmap, made static.
11733 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11734 made static.
11735 (m68k_cannot_store_register): Renamed from cannot_store_register,
11736 made static.
11737 (the_low_target): New.
11738 * linux-mips-low.c (num_regs): Remove.
11739 (mips_num_regs): Define.
11740 (mips_regmap): Renamed from regmap, made static.
11741 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11742 made static.
11743 (mips_cannot_store_register): Renamed from cannot_store_register,
11744 made static.
11745 (the_low_target): New.
11746 * linux-ppc-low.c (num_regs): Remove.
11747 (ppc_num_regs): Define.
11748 (ppc_regmap): Renamed from regmap, made static.
11749 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11750 made static.
11751 (ppc_cannot_store_register): Renamed from cannot_store_register,
11752 made static.
11753 (the_low_target): New.
11754 * linux-s390-low.c (num_regs): Remove.
11755 (s390_num_regs): Define.
11756 (s390_regmap): Renamed from regmap, made static.
11757 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11758 made static.
11759 (s390_cannot_store_register): Renamed from cannot_store_register,
11760 made static.
11761 (the_low_target): New.
11762 * linux-sh-low.c (num_regs): Remove.
11763 (sh_num_regs): Define.
11764 (sh_regmap): Renamed from regmap, made static.
11765 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11766 made static.
11767 (sh_cannot_store_register): Renamed from cannot_store_register,
11768 made static.
11769 (the_low_target): New.
11770 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11771 (the_low_target): New.
11772
117732002-04-09 Daniel Jacobowitz <drow@mvista.com>
11774
11775 * Makefile.in: Add stamp-h target.
11776 * configure.in: Create stamp-h.
11777 * configure: Regenerated.
11778
117792002-04-09 Daniel Jacobowitz <drow@mvista.com>
11780
11781 * inferiors.c: New file.
11782 * target.c: New file.
11783 * target.h: New file.
11784 * Makefile.in: Add target.o and inferiors.o. Update
11785 dependencies.
11786 * linux-low.c (inferior_pid): New static variable,
11787 moved from server.c.
11788 (linux_create_inferior): Renamed from create_inferior.
11789 Call add_inferior. Return 0 on success instead of a PID.
11790 (linux_attach): Renamed from myattach.
11791 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11792 (linux_thread_alive): Renamed from mythread_alive.
11793 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11794 child dies.
11795 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11796 (regsets_store_inferior_registers): Correct error message.
11797 Add missing ``return 0''.
11798 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11799 (linux_store_registers): Renamed from store_inferior_registers.
11800 (linux_read_memory): Renamed from read_inferior_memory.
11801 (linux_write_memory): Renamed from write_inferior_memory.
11802 (linux_target_ops): New structure.
11803 (initialize_low): Call set_target_ops ().
11804 * remote-utils.c (unhexify): New function.
11805 (hexify): New function.
11806 (input_interrupt): Send signals to ``signal_pid''.
11807 * server.c (inferior_pid): Remove.
11808 (start_inferior): Update create_inferior call.
11809 (attach_inferior): Call add_inferior.
11810 (handle_query): New function.
11811 (main): Call handle_query for `q' packets.
11812 * server.h: Include "target.h". Remove obsolete prototypes.
11813 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11814
118152002-04-09 Daniel Jacobowitz <drow@mvista.com>
11816
11817 * Makefile.in: Add WARN_CFLAGS. Update configury
11818 dependencies.
11819 * configure.in: Check for <string.h>
11820 * configure: Regenerate.
11821 * config.in: Regenerate.
11822 * gdbreplay.c: Include needed system headers.
11823 (remote_open): Remove strchr prototype.
11824 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11825 * regcache.c (supply_register): Change buf argument to const void *.
11826 (supply_register_by_name): Likewise.
11827 (collect_register): Change buf argument to void *.
11828 (collect_register_by_name): Likewise.
11829 * regcache.h: Add missing prototypes.
11830 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11831 * server.c (handle_query): New function.
11832 (attached): New static variable, moved out of main.
11833 (main): Quiet longjmp clobber warnings.
11834 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11835 * utils.c (error): Remove NORETURN.
11836 (fatal): Likewise.