]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdbserver: don't pick a random thread if the current thread dies
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f0db101d
PA
12015-08-21 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (wait_for_sigstop): Always switch to no thread
4 selected if the previously current thread dies.
5 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6 process instead of the current thread's.
7 * remote-utils.c (input_interrupt): Don't check if there's no
8 current thread.
9 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10 current thread to the general thread fails, error out.
11 (handle_qxfer_auxv, handle_qxfer_libraries)
12 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
13 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
14 (handle_query): Check if there's a thread selected instead of
15 checking whether there's any thread in the thread list.
16 (handle_qxfer_threads, handle_qxfer_btrace)
17 (handle_qxfer_btrace_conf): Don't error out early if there's no
18 thread in the thread list.
19 (handle_v_cont, myresume): Don't set the current thread to the
20 continue thread.
21 (process_serial_event) <Hg handling>: Also set thread_id if the
22 previous general thread is still alive.
23 (process_serial_event) <g/G handling>: If setting the current
24 thread to the general thread fails, error out.
25 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
26 thread's lwp instead of the current thread's.
27 * target.c (set_desired_thread): If the desired thread was not
28 found, leave the current thread pointing to NULL. Return an int
29 (boolean) indicating success.
30 * target.h (set_desired_thread): Change return type to int.
31
40045d91
MF
322015-08-20 Max Filippov <jcmvbkbc@gmail.com>
33
34 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
35 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
36 #includes.
37 (ps_get_thread_area): New function.
38
45face3b
GB
392015-08-19 Gary Benson <gbenson@redhat.com>
40
41 * hostio.c (handle_pread): Do not attempt to read more data
42 than hostio_reply_with_data can fit in a packet.
43
16d5f642
JB
442015-08-18 Joel Brobecker <brobecker@adacore.com>
45
46 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
47
a738da3a
MF
482015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
49
50 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
51
33ebda9d
PA
522015-08-06 Pedro Alves <palves@redhat.com>
53
54 * tracepoint.c (expr_eval_result): Now an int.
55
a44892be
PA
562015-08-06 Pedro Alves <palves@redhat.com>
57
58 * gdbthread.h (struct regcache): Forward declare.
59 (struct thread_info) <regcache_data>: Now a struct regcache
60 pointer.
61 * inferiors.c (inferior_regcache_data)
62 (set_inferior_regcache_data): Now work with struct regcache
63 pointers.
64 * inferiors.h (struct regcache): Forward declare.
65 (inferior_regcache_data, set_inferior_regcache_data): Now work
66 with struct regcache pointers.
67 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
68 (free_register_cache_thread): Remove struct regcache pointer
69 casts.
70
608a1e46
PA
712015-08-06 Pedro Alves <palves@redhat.com>
72
73 * server.c (captured_main): On error, print the exception message
74 to stderr, and if run_once is set, throw a quit.
75
f0ce0d3a
PA
762015-08-06 Pedro Alves <palves@redhat.com>
77
78 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
79 the current thread.
80
bf47e248
PA
812015-08-06 Pedro Alves <palves@redhat.com>
82
83 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
84 reading beyond the passed in buffer length.
85
b6b9ffcc
PL
862015-08-06 Pierre Langlois <pierre.langlois@arm.com>
87
88 * tracepoint.c (symbol_list) <required>: Remove.
89
863d01bd
PA
902015-08-06 Pedro Alves <palves@redhat.com>
91
92 * linux-low.c (handle_extended_wait): Set the fork child's suspend
93 count if stopping and suspending threads.
94 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
95 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
96 (linux_detach): Complete an ongoing step-over.
97 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
98 throughout.
99 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
100 (linux_wait_1): If passing a signal to the inferior after
101 finishing a step-over, unsuspend and re-resume all lwps. If we
102 see a single-step event but the thread should be continuing, don't
103 pass the trap to gdb.
104 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
105 internal_error instead of gdb_assert.
106 (enqueue_pending_signal): New function.
107 (check_ptrace_stopped_lwp_gone): Add debug output.
108 (start_step_over): Use internal_error instead of gdb_assert.
109 (complete_ongoing_step_over): New function.
110 (linux_resume_one_thread): Don't resume a suspended thread.
111 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
112 it stepping.
113
00db26fa
PA
1142015-08-06 Pedro Alves <palves@redhat.com>
115
116 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
117 (linux_thread_alive): Use lwp_is_marked_dead.
118 (extended_event_reported): Delete.
119 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
120 instead of extended_event_reported.
121 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
122 as well.
123 (lwp_is_marked_dead): New function.
124 (lwp_running): Use lwp_is_marked_dead.
125 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
126 comment.
127
ad071a30
PA
1282015-08-06 Pedro Alves <palves@redhat.com>
129
130 * linux-low.c (linux_wait_1): Move fork event output out of the
131 !report_to_gdb check. Pass event_child->waitstatus to
132 target_waitstatus_to_string instead of ourstatus.
133
524b57e6
YQ
1342015-08-04 Yao Qi <yao.qi@linaro.org>
135
136 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
137 if current_thread is 32 bit.
138
6085d6f6
YQ
1392015-08-04 Yao Qi <yao.qi@linaro.org>
140
141 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
142 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
143 * server.c (extended_protocol): Remove "static".
144 * server.h (extended_protocol): Declare it.
145
8a7e4587
YQ
1462015-08-04 Yao Qi <yao.qi@linaro.org>
147
148 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
149 both aarch64 and aarch32.
150 (aarch64_set_pc): Likewise.
151
3b53ae99
YQ
1522015-08-04 Yao Qi <yao.qi@linaro.org>
153
154 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
155 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
156 arm-with-neon.xml to srv_xmlfiles.
157 * linux-aarch64-low.c: Include linux-aarch32-low.h.
158 (is_64bit_tdesc): New function.
159 (aarch64_linux_read_description): New function.
160 (aarch64_arch_setup): Call aarch64_linux_read_description.
161 (regs_info): Rename to regs_info_aarch64.
162 (aarch64_regs_info): Return right regs_info.
163 (initialize_low_arch): Call initialize_low_arch_aarch32.
164
bd9e6534
YQ
1652015-08-04 Yao Qi <yao.qi@linaro.org>
166
167 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
168 * linux-aarch32-low.c: New file.
169 * linux-aarch32-low.h: New file.
170 * linux-arm-low.c (arm_fill_gregset): Move it to
171 linux-aarch32-low.c.
172 (arm_store_gregset): Likewise.
173 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
174 (arm_store_vfpregset): Call arm_store_vfpregset_num.
175 (arm_arch_setup): Check if PTRACE_GETREGSET works.
176 (regs_info): Rename to regs_info_arm.
177 (arm_regs_info): Return regs_info_aarch32 if
178 have_ptrace_getregset is 1 and target description is
179 arm_with_neon or arm_with_vfpv3.
180 (initialize_low_arch): Don't call init_registers_arm_with_neon.
181 Call initialize_low_arch_aarch32 instead.
182
ded48a5e
YQ
1832015-08-04 Yao Qi <yao.qi@linaro.org>
184
185 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
186 * linux-low.c: ... here.
187 * linux-low.h (have_ptrace_getregset): Declare it.
188
96e9210f
PA
1892015-08-04 Pedro Alves <palves@redhat.com>
190
191 * thread-db.c (struct thread_db): Use new typedefs.
192 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
193 CHK calls.
194 (disable_thread_event_reporting): Cast result of dlsym to
195 destination function pointer type.
196 (thread_db_mourn): Use td_ta_delete_ftype.
197
af60a1ef
SL
1982015-08-03 Sandra Loosemore <sandra@codesourcery.com>
199
200 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
201 arch variant.
202 (CDX_BREAKPOINT): Define for R2.
203 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
204 (the_low_target): Add comments.
205
e8b41681
YQ
2062015-07-30 Yao Qi <yao.qi@linaro.org>
207
208 * linux-arm-low.c (arm_hwcap): Remove it.
209 (arm_read_description): New local variable arm_hwcap. Don't
210 set arm_hwcap to zero.
211
89abb039
YQ
2122015-07-30 Yao Qi <yao.qi@linaro.org>
213
214 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
215 Use regcache->tdesc instead.
216 (arm_store_wmmxregset): Likewise.
217 (arm_fill_vfpregset): Likewise.
218 (arm_store_vfpregset): Likewise.
219
deca266c
YQ
2202015-07-30 Yao Qi <yao.qi@linaro.org>
221
222 * linux-arm-low.c: Include arch/arm.h.
223 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
224 (arm_store_gregset): Likewise.
225
aa58a496
SM
2262015-07-29 Simon Marchi <simon.marchi@ericsson.com>
227
228 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
229 ptrace's 4th parameter.
230
50904b25
YQ
2312015-07-27 Yao Qi <yao.qi@linaro.org>
232
233 * configure.srv (case aarch64*-*-linux*): Don't set
234 srv_linux_usrregs.
235
5826e159
PA
2362015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
237
238 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
239 sys/ptrace.h.
240 * linux-arm-low.c: Likewise.
241 * linux-cris-low.c: Likewise.
242 * linux-crisv32-low.c: Likewise.
243 * linux-low.c: Likewise.
244 * linux-m68k-low.c: Likewise.
245 * linux-mips-low.c: Likewise.
246 * linux-nios2-low.c: Likewise.
247 * linux-s390-low.c: Likewise.
248 * linux-sparc-low.c: Likewise.
249 * linux-tic6x-low.c: Likewise.
250 * linux-tile-low.c: Likewise.
251 * linux-x86-low.c: Likewise.
252
54019719
PA
2532015-07-24 Pedro Alves <palves@redhat.com>
254
255 * config.in: Regenerate.
256 * configure: Regenerate.
257
eb7aa561
PA
2582015-07-24 Pedro Alves <palves@redhat.com>
259
260 * acinclude.m4: Include ../ptrace.m4.
261 * configure.ac: Call GDB_AC_PTRACE.
262 * config.in, configure: Regenerate.
263
55d7b841
YQ
2642015-07-24 Yao Qi <yao.qi@linaro.org>
265
266 * linux-low.c (linux_create_inferior): Remove setting to
267 proc->priv->new_inferior.
268 (linux_attach): Likewise.
269 (linux_low_filter_event): Likewise.
270 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
271
c06cbd92
YQ
2722015-07-24 Yao Qi <yao.qi@linaro.org>
273
274 * linux-low.c (linux_arch_setup): New function.
275 (linux_low_filter_event): If proc->tdesc is NULL and
276 proc->attached is true, call the_low_target.arch_setup.
277 Otherwise, keep status pending, and return.
278 (linux_resume_one_lwp_throw): Don't call get_pc if
279 thread->while_stepping isn't NULL. Don't call
280 get_thread_regcache if proc->tdesc is NULL.
281 (need_step_over_p): Return 0 if proc->tdesc is NULL.
282 (linux_target_ops): Install arch_setup.
283 * server.c (start_inferior): Call the_target->arch_setup.
284 * target.h (struct target_ops) <arch_setup>: New field.
285 (target_arch_setup): New marco.
286 * lynx-low.c (lynx_target_ops): Update.
287 * nto-low.c (nto_target_ops): Update.
288 * spu-low.c (spu_target_ops): Update.
289 * win32-low.c (win32_target_ops): Update.
290
5ae3ebba
YQ
2912015-07-24 Yao Qi <yao.qi@linaro.org>
292
293 * linux-low.c (linux_add_process): Don't set
294 proc->priv->new_inferior.
295 (linux_create_inferior): Set proc->priv->new_inferior to 1.
296 (linux_attach): Likewise.
297
eb97750b
YQ
2982015-07-24 Yao Qi <yao.qi@linaro.org>
299
300 * server.c (start_inferior): Code refactor.
301
51aee833
YQ
3022015-07-24 Yao Qi <yao.qi@linaro.org>
303
304 * server.c (process_serial_event): Set general_thread.
305
af1b22f3
YQ
3062015-07-21 Yao Qi <yao.qi@linaro.org>
307
308 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
309 aarch64_linux_get_debug_reg_capacity.
310
554717a3
YQ
3112015-07-17 Yao Qi <yao.qi@linaro.org>
312
313 * Makefile.in (aarch64-linux-hw-point.o): New rule.
314 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
315 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
316 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
317 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
318 (AARCH64_HWP_ALIGNMENT): Likewise.
319 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
320 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
321 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
322 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
323 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
324 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
325 (struct aarch64_debug_reg_state): Likewise.
326 (struct arch_lwp_info): Likewise.
327 (aarch64_align_watchpoint): Likewise.
328 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
329 (aarch64_watchpoint_length): Likewise.
330 (aarch64_point_encode_ctrl_reg): Likewise
331 (aarch64_point_is_aligned): Likewise.
332 (aarch64_align_watchpoint): Likewise.
333 (aarch64_linux_set_debug_regs):
334 (aarch64_dr_state_insert_one_point): Likewise.
335 (aarch64_dr_state_remove_one_point): Likewise.
336 (aarch64_handle_breakpoint): Likewise.
337 (aarch64_handle_aligned_watchpoint): Likewise.
338 (aarch64_handle_unaligned_watchpoint): Likewise.
339 (aarch64_handle_watchpoint): Likewise.
340
c67ca4de
YQ
3412015-07-17 Yao Qi <yao.qi@linaro.org>
342
343 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
344 and don't aarch64_get_debug_reg_state. All callers update.
345 (aarch64_handle_aligned_watchpoint): Likewise.
346 (aarch64_handle_unaligned_watchpoint): Likewise.
347 (aarch64_handle_watchpoint): Likewise.
348 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
349 (aarch64_remove_point): Likewise.
350
25abf979
YQ
3512015-07-17 Yao Qi <yao.qi@linaro.org>
352
353 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
354 debug_printf.
355 (aarch64_handle_unaligned_watchpoint): Likewise.
356
db1ff28b
JK
3572015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
358
359 Revert the previous 3 commits:
360 Move gdb_regex* to common/
361 Move linux_find_memory_regions_full & co.
362 gdbserver build-id attribute generator
363
700ca40f
JK
3642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
365 Jan Kratochvil <jan.kratochvil@redhat.com>
366
367 gdbserver build-id attribute generator.
368 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
369 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
370 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
371 (find_phdr): New.
372 (get_dynamic): Use find_pdhr to traverse program headers.
373 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
374 (compare_mapping_entry_range, struct find_memory_region_callback_data)
375 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
376 (get_hex_build_id): New.
377 (linux_qxfer_libraries_svr4): Add optional build-id attribute
378 to reply XML document.
379
9904185c
JK
3802015-07-15 Aleksandar Ristovski <aristovski@qnx.com
381 Jan Kratochvil <jan.kratochvil@redhat.com>
382
383 * target.c: Include target/target-utils.h and fcntl.h.
384 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
385 (target_fileio_read_stralloc): New functions.
386
6e5b4429
JK
3872015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
388
389 * Makefile.in (OBS): Add gdb_regex.o.
390 (gdb_regex.o): New.
391 * config.in: Rebuilt.
392 * configure: Rebuilt.
393
ddc98fbf
JK
3942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
395 Jan Kratochvil <jan.kratochvil@redhat.com>
396
397 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
398 * Makefile.in (OBS): Add target-utils.o.
399 (linux-maps.o, target-utils.o): New.
400 * configure.srv (srv_linux_obj): Add linux-maps.o.
401
e57bb7a0
PL
4022015-07-15 Pierre Langlois <pierre.langlois@arm.com>
403
404 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
405 function, return 1.
406 (the_low_target): Install it.
407
586b02a9
PA
4082015-07-14 Pedro Alves <palves@redhat.com>
409
410 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
411 Instead, ignore ECHILD, and throw an error for other errnos.
412
58c1b36c
PA
4132015-07-10 Pedro Alves <palves@redhat.com>
414
415 * event-loop.c (struct callback_event) <data>: Change type to
416 gdb_client_data instance instead of gdb_client_data pointer.
417 (append_callback_event): Adjust.
418
421530db
PL
4192015-07-10 Pierre Langlois <pierre.langlois@arm.com>
420
421 * linux-aarch64-low.c: Add comments for each linux_target_ops
422 method. Remove comments already covered in target_ops and
423 linux_target_ops definitions.
424 (the_low_target): Add comments for each unimplemented method.
425
c2d65f38
YQ
4262015-07-09 Yao Qi <yao.qi@linaro.org>
427
428 * linux-aarch64-low.c (aarch64_regmap): Remove.
429 (aarch64_usrregs_info): Remove.
430 (regs_info): Set field usrregs to NULL.
431
b20a6524
MM
4322015-07-02 Markus Metzger <markus.t.metzger@intel.com>
433
434 * linux-low.c: Include "rsp-low.h"
435 (linux_low_encode_pt_config, linux_low_encode_raw): New.
436 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
437 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
438 (handle_btrace_enable_pt): New.
439 (handle_btrace_general_set): Support "pt".
440 (handle_btrace_conf_general_set): Support "pt:size".
441
96c97461
PL
4422015-06-29 Pierre Langlois <pierre.langlois@arm.com>
443
444 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
445 Z_PACKET_SW_BP.
446
37d66942
PL
4472015-06-29 Pierre Langlois <pierre.langlois@arm.com>
448
449 * linux-aarch64-low.c: Remove comment about endianness.
450 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
451 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
452 memcmp.
453
dc06243f
GB
4542015-06-24 Gary Benson <gbenson@redhat.com>
455
456 * linux-i386-ipa.c (stdint.h): Do not include.
457 * lynx-i386-low.c (stdint.h): Likewise.
458 * lynx-ppc-low.c (stdint.h): Likewise.
459 * mem-break.c (stdint.h): Likewise.
460 * thread-db.c (stdint.h): Likewise.
461 * tracepoint.c (stdint.h): Likewise.
462 * win32-low.c (stdint.h): Likewise.
463
124e13d9
SM
4642015-06-18 Simon Marchi <simon.marchi@ericsson.com>
465
466 * server.c (write_qxfer_response): Update call to
467 remote_escape_output.
468
909c2cda
JK
4692015-06-15 Aleksandar Ristovski <aristovski@qnx.com
470 Jan Kratochvil <jan.kratochvil@redhat.com>
471
472 Merge multiple hex conversions.
473 * gdbreplay.c (tohex): Rename to 'fromhex'.
474 (logchar): Use fromhex.
475
24c05f46
JK
4762015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
477
478 * server.c (handle_qxfer_libraries): Set `version' attribute for
479 <library-list>.
480
14d2069a
GB
4812015-06-10 Gary Benson <gbenson@redhat.com>
482
483 * target.h (struct target_ops) <multifs_open>: New field.
484 <multifs_unlink>: Likewise.
485 <multifs_readlink>: Likewise.
486 * linux-low.c (nat/linux-namespaces.h): New include.
487 (linux_target_ops): Initialize the_target->multifs_open,
488 the_target->multifs_unlink and the_target->multifs_readlink.
489 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
490 * hostio.c (hostio_fs_pid): New static variable.
491 (hostio_handle_new_gdb_connection): New function.
492 (handle_setfs): Likewise.
493 (handle_open): Use the_target->multifs_open as appropriate.
494 (handle_unlink): Use the_target->multifs_unlink as appropriate.
495 (handle_readlink): Use the_target->multifs_readlink as
496 appropriate.
497 (handle_vFile): Handle vFile:setfs packets.
498 * server.c (handle_query): Call hostio_handle_new_gdb_connection
499 after target_handle_new_gdb_connection.
500
4b8b5e72
GB
5012015-06-10 Gary Benson <gbenson@redhat.com>
502
503 * configure.ac (AC_CHECK_FUNCS): Add setns.
504 * config.in: Regenerate.
505 * configure: Likewise.
506 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
507 (linux-namespaces.o): New rule.
508 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
509
3ac2e371
GB
5102015-06-09 Gary Benson <gbenson@redhat.com>
511
512 * hostio.c (handle_open): Process mode argument with
513 fileio_to_host_mode.
514
ca9b78ce
YQ
5152015-06-01 Yao Qi <yao.qi@linaro.org>
516
517 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
518 * linux-x86-low.c: Likewise.
519
bfacd19d
DB
5202015-05-28 Don Breazeal <donb@codesourcery.com>
521
522 * linux-low.c (handle_extended_wait): Initialize
523 thread_info.last_resume_kind for new fork children.
524
452003ef
PA
5252015-05-15 Pedro Alves <palves@redhat.com>
526
527 * target.h (target_handle_new_gdb_connection): Rewrite using if
528 wrapped in do/while.
529
1041a03c
JB
5302015-05-14 Joel Brobecker <brobecker@adacore.com>
531
532 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
533 * configure, config.in: Regenerate.
534 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
535 Declare typedef.
536
c269dbdb
DB
5372015-05-12 Don Breazeal <donb@codesourcery.com>
538
539 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
540 PTRACE_EVENT_VFORK_DONE.
541 (linux_low_ptrace_options, extended_event_reported): Add vfork
542 events.
543 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
544 and "vforkdone" for RSP 'T' Stop Reply Packet.
545 * server.h (report_vfork_events): Declare
546 global variable.
547
3a8a0396
DB
5482015-05-12 Don Breazeal <donb@codesourcery.com>
549
550 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
551 (the_low_target) <new_fork>: Initialize new member.
552 * linux-arm-low.c (arm_new_fork): New function.
553 (the_low_target) <new_fork>: Initialize new member.
554 * linux-low.c (handle_extended_wait): Call new target function
555 new_fork.
556 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
557 * linux-mips-low.c (mips_add_watchpoint): New function
558 extracted from mips_insert_point.
559 (the_low_target) <new_fork>: Initialize new member.
560 (mips_linux_new_fork): New function.
561 (mips_insert_point): Call mips_add_watchpoint.
562 * linux-x86-low.c (x86_linux_new_fork): New function.
563 (the_low_target) <new_fork>: Initialize new member.
564
de0d863e
DB
5652015-05-12 Don Breazeal <donb@codesourcery.com>
566
567 * linux-low.c (handle_extended_wait): Implement return value,
568 rename argument 'event_child' to 'event_lwp', handle
569 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
570 (linux_low_ptrace_options): New function.
571 (linux_low_filter_event): Call linux_low_ptrace_options,
572 use different argument fo linux_enable_event_reporting,
573 use return value from handle_extended_wait.
574 (extended_event_reported): New function.
575 (linux_wait_1): Call extended_event_reported and set
576 status to report fork events.
577 (linux_write_memory): Add pid to debug message.
578 (reset_lwp_ptrace_options_callback): New function.
579 (linux_handle_new_gdb_connection): New function.
580 (linux_target_ops): Initialize new structure member.
581 * linux-low.h (struct lwp_info) <waitstatus>: New member.
582 * lynx-low.c: Initialize new structure member.
583 * remote-utils.c (prepare_resume_reply): Implement stop reason
584 "fork" for "T" stop message.
585 * server.c (handle_query): Call handle_new_gdb_connection.
586 * server.h (report_fork_events): Declare global flag.
587 * target.h (struct target_ops) <handle_new_gdb_connection>:
588 New member.
589 (target_handle_new_gdb_connection): New macro.
590 * win32-low.c: Initialize new structure member.
591
ddcbc397
DB
5922015-05-12 Don Breazeal <donb@codesourcery.com>
593
594 * mem-break.c (APPEND_TO_LIST): Define macro.
595 (clone_agent_expr): New function.
596 (clone_one_breakpoint): New function.
597 (clone_all_breakpoints): New function.
598 * mem-break.h: Declare new functions.
599
89245bc0
DB
6002015-05-12 Don Breazeal <donb@codesourcery.com>
601
602 * linux-low.c (linux_supports_fork_events): New function.
603 (linux_supports_vfork_events): New function.
604 (linux_target_ops): Initialize new structure members.
605 (initialize_low): Call linux_check_ptrace_features.
606 * lynx-low.c (lynx_target_ops): Initialize new structure
607 members.
608 * server.c (report_fork_events, report_vfork_events):
609 New global flags.
610 (handle_query): Add new features to qSupported packet and
611 response.
612 (captured_main): Initialize new global variables.
613 * target.h (struct target_ops) <supports_fork_events>:
614 New member.
615 <supports_vfork_events>: New member.
616 (target_supports_fork_events): New macro.
617 (target_supports_vfork_events): New macro.
618 * win32-low.c (win32_target_ops): Initialize new structure
619 members.
620
835205d0
GB
6212015-05-12 Gary Benson <gbenson@redhat.com>
622
623 * server.c (handle_qxfer_exec_file): Use current process
624 if annex is empty.
625
21e94bd9
SL
6262015-05-08 Sandra Loosemore <sandra@codesourcery.com>
627
628 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
629 Remove HAVE_PTRACE_GETREGS conditionals.
630 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
631 instead of PTRACE_GETREGS and PTRACE_SETREGS.
632
45614f15
YQ
6332015-05-08 Yao Qi <yao.qi@linaro.org>
634
635 * linux-low.c (linux_supports_conditional_breakpoints): New
636 function.
637 (linux_target_ops): Install new target method.
638 * lynx-low.c (lynx_target_ops): Install NULL hook for
639 supports_conditional_breakpoints.
640 * nto-low.c (nto_target_ops): Likewise.
641 * spu-low.c (spu_target_ops): Likewise.
642 * win32-low.c (win32_target_ops): Likewise.
643 * server.c (handle_query): Check
644 target_supports_conditional_breakpoints.
645 * target.h (struct target_ops) <supports_conditional_breakpoints>:
646 New field.
647 (target_supports_conditional_breakpoints): New macro.
648
80ad801e
PA
6492015-05-06 Pedro Alves <palves@redhat.com>
650
651 PR server/18081
652 * server.c (start_inferior): If the process exits, mourn it.
653
819843c7
GB
6542015-04-21 Gary Benson <gbenson@redhat.com>
655
656 * hostio.c (fileio_open_flags_to_host): Factored out to
657 fileio_to_host_openflags in common/fileio.c. Single use
658 updated.
659
a2d5a9d7
MF
6602015-04-17 Max Filippov <jcmvbkbc@gmail.com>
661
662 * linux-xtensa-low.c (xtensa_fill_gregset)
663 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
664 XCHAL_HAVE_LOOP.
665
deb44829
MF
6662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
667
668 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
669 (regs_info): Replace usrregs pointer with NULL.
670
e57f1de3
GB
6712015-04-17 Gary Benson <gbenson@redhat.com>
672
673 * target.h (struct target_ops) <pid_to_exec_file>: New field.
674 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
675 * server.c (handle_qxfer_exec_file): New function.
676 (qxfer_packets): Add exec-file entry.
677 (handle_query): Report qXfer:exec-file:read as supported packet.
678
62828379
RN
6792015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
680
681 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
682
b88bb450
GB
6832015-04-09 Gary Benson <gbenson@redhat.com>
684
685 * hostio-errno.c (errno_to_fileio_error): Remove function.
686 Update caller to use remote_fileio_to_fio_error.
687
c8f4bfdd
YQ
6882015-04-09 Yao Qi <yao.qi@linaro.org>
689
690 * linux-low.c (linux_insert_point): Call
691 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
692 (linux_remove_point): Call remove_memory_breakpoint if type is
693 raw_bkpt_type_sw.
694 * linux-x86-low.c (x86_insert_point): Don't call
695 insert_memory_breakpoint.
696 (x86_remove_point): Don't call remove_memory_breakpoint.
697
41f98f02
PA
6982015-04-01 Pedro Alves <palves@redhat.com>
699 Cleber Rosa <crosa@redhat.com>
700
701 * server.c (gdbserver_usage): Reorganize and extend the usage
702 message.
703
2bf6fb9d
PA
7042015-03-24 Pedro Alves <palves@redhat.com>
705
706 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
707 output. Also dump TRAP_TRACE.
708 (linux_low_filter_event): In debug output, distinguish a
709 resume_stop SIGSTOP from a delayed SIGSTOP.
710
369f6daa
GB
7112015-03-24 Gary Benson <gbenson@redhat.com>
712
713 * linux-x86-low.c (x86_linux_new_thread): Moved to
714 nat/x86-linux.c.
715 (x86_linux_prepare_to_resume): Likewise.
716
8e5d4070
GB
7172015-03-24 Gary Benson <gbenson@redhat.com>
718
719 * Makefile.in (x86-linux-dregs.o): New rule.
720 * configure.srv: Add x86-linux-dregs.o to relevant targets.
721 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
722 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
723 (x86_linux_dr_get): Likewise.
724 (x86_linux_dr_set): Likewise.
725 (update_debug_registers_callback): Likewise.
726 (x86_linux_dr_set_addr): Likewise.
727 (x86_linux_dr_get_addr): Likewise.
728 (x86_linux_dr_set_control): Likewise.
729 (x86_linux_dr_get_control): Likewise.
730 (x86_linux_dr_get_status): Likewise.
731 (x86_linux_update_debug_registers): Likewise.
732
2b95d440
GB
7332015-03-24 Gary Benson <gbenson@redhat.com>
734
735 * linux-x86-low.c (x86_linux_update_debug_registers):
736 New function, factored out from...
737 (x86_linux_prepare_to_resume): ...this.
738
14b0bc68
GB
7392015-03-24 Gary Benson <gbenson@redhat.com>
740
741 * linux-x86-low.c (x86_linux_dr_get): Update comments.
742 (x86_linux_dr_set): Likewise.
743 (update_debug_registers_callback): Likewise.
744 (x86_linux_dr_set_addr): Likewise.
745 (x86_linux_dr_get_addr): Likewise.
746 (x86_linux_dr_set_control): Likewise.
747 (x86_linux_dr_get_control): Likewise.
748 (x86_linux_dr_get_status): Likewise.
749 (x86_linux_prepare_to_resume): Likewise.
750
5dfe6ca8
GB
7512015-03-24 Gary Benson <gbenson@redhat.com>
752
753 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
754 Use perror_with_name. Pass string through gettext.
755 (x86_linux_dr_set): Likewise.
756
d33472ad
GB
7572015-03-24 Gary Benson <gbenson@redhat.com>
758
759 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
760 (x86_linux_dr_set_addr): ...this.
761 (x86_dr_low_get_addr): Rename to...
762 (x86_linux_dr_get_addr): ...this.
763 (x86_dr_low_set_control): Rename to...
764 (x86_linux_dr_set_control): ...this.
765 (x86_dr_low_get_control): Rename to...
766 (x86_linux_dr_get_control): ...this.
767 (x86_dr_low_get_status): Rename to...
768 (x86_linux_dr_get_status): ...this.
769 (x86_dr_low): Update with new function names.
770
4b134ca1
GB
7712015-03-24 Gary Benson <gbenson@redhat.com>
772
773 * Makefile.in (x86-linux.o): New rule.
774 * configure.srv: Add x86-linux.o to relevant targets.
775 * linux-low.c (lwp_set_arch_private_info): New function.
776 (lwp_arch_private_info): Likewise.
777 * linux-x86-low.c: Include nat/x86-linux.h.
778 (arch_lwp_info): Removed structure.
779 (update_debug_registers_callback):
780 Use lwp_set_debug_registers_changed.
781 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
782 and lwp_set_debug_registers_changed.
783 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
784
34c703da
GB
7852015-03-24 Gary Benson <gbenson@redhat.com>
786
787 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
788 * linux-arm-low.c (arm_new_thread): Likewise.
789 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
790 * linux-mips-low.c (mips_linux_new_thread): Likewise.
791 * linux-x86-low.c (x86_linux_new_thread): Likewise.
792 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
793
cff068da
GB
7942015-03-24 Gary Benson <gbenson@redhat.com>
795
796 * linux-low.c (ptid_of_lwp): New function.
797 (lwp_is_stopped): Likewise.
798 (lwp_stop_reason): Likewise.
799 * linux-x86-low.c (update_debug_registers_callback):
800 Use lwp_is_stopped.
801 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
802 lwp_stop_reason.
803
b2f7c7e8
GB
8042015-03-24 Gary Benson <gbenson@redhat.com>
805
806 * linux-low.h (linux_stop_lwp): Remove declaration.
807
6d4ee8c6
GB
8082015-03-24 Gary Benson <gbenson@redhat.com>
809
810 * linux-low.h: Include nat/linux-nat.h.
811 * linux-low.c (iterate_over_lwps_args): New structure.
812 (iterate_over_lwps_filter): New function.
813 (iterate_over_lwps): Likewise.
814 * linux-x86-low.c (update_debug_registers_callback):
815 Update signature to what iterate_over_lwps expects.
816 Remove PID check that iterate_over_lwps now performs.
817 (x86_dr_low_set_addr): Use iterate_over_lwps.
818 (x86_dr_low_set_control): Likewise.
819
70a0bb6b
GB
8202015-03-24 Gary Benson <gbenson@redhat.com>
821
822 * linux-x86-low.c (x86_debug_reg_state): New function.
823 (x86_linux_prepare_to_resume): Use the above.
824
7b669087
GB
8252015-03-24 Gary Benson <gbenson@redhat.com>
826
827 * linux-low.c (current_lwp_ptid): New function.
828 * linux-x86-low.c: Include nat/linux-nat.h.
829 (x86_dr_low_get_addr): Use current_lwp_ptid.
830 (x86_dr_low_get_control): Likewise.
831 (x86_dr_low_get_status): Likewise.
832
eef49a3d
PA
8332015-03-20 Pedro Alves <palves@redhat.com>
834
835 * tracepoint.c (cmd_qtstatus): Make "str" const.
836
b2333d22
PA
8372015-03-20 Pedro Alves <palves@redhat.com>
838
839 * server.c (handle_general_set): Make "req_str" const.
840
23f238d3
PA
8412015-03-19 Pedro Alves <palves@redhat.com>
842
843 * linux-low.c (linux_resume_one_lwp): Rename to ...
844 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
845 instead call perror_with_name.
846 (check_ptrace_stopped_lwp_gone): New function.
847 (linux_resume_one_lwp): Reimplement as wrapper around
848 linux_resume_one_lwp_throw that swallows errors if the LWP is
849 gone.
850
91baf43f
PA
8512015-03-19 Pedro Alves <palves@redhat.com>
852
853 * linux-low.c (count_events_callback, select_event_lwp_callback):
854 No longer check whether the thread has resume_stop as last resume
855 kind.
856
8bf3b159
PA
8572015-03-19 Pedro Alves <palves@redhat.com>
858
859 * linux-low.c (count_events_callback, select_event_lwp_callback):
860 Use the lwp's status_pending_p field, not the thread's.
861
b90fc188
PA
8622015-03-19 Pedro Alves <palves@redhat.com>
863
864 * linux-low.c (select_event_lwp_callback): Update comments to
865 no longer mention SIGTRAP.
866
464b0089
GB
8672015-03-18 Gary Benson <gbenson@redhat.com>
868
869 * server.c (handle_query): Do not report vFile:fstat as supported.
870
aa9e327f
GB
8712015-03-11 Gary Benson <gbenson@redhat.com>
872
873 * hostio.c (sys/types.h): New include.
874 (sys/stat.h): Likewise.
875 (common-remote-fileio.h): Likewise.
876 (handle_fstat): New function.
877 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 878
791c0056
GB
8792015-03-11 Gary Benson <gbenson@redhat.com>
880
881 * configure.ac (AC_CHECK_MEMBERS): Add checks for
882 struct stat.st_blocks and struct stat.st_blksize.
883 * configure: Regenerate.
884 * config.in: Likewise.
885 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
886 (OBS): Add common-remote-fileio.o.
887 (common-remote-fileio.o): New rule.
888
9a9df970
PA
8892015-03-09 Pedro Alves <palves@redhat.com>
890
891 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
892 'struct sockaddr' pointer in 'accept' call.
893
9eb1356e
PA
8942015-03-09 Pedro Alves <palves@redhat.com>
895
896 Revert:
897 2015-03-07 Pedro Alves <palves@redhat.com>
898 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
899 or <winsock2.h> here. Instead include "gdb_socket.h".
900 (remote_open): Use union gdb_sockaddr_u.
901 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
902 or <winsock2.h> here. Instead include "gdb_socket.h".
903 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
904 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
905 or <sys/un.h>.
906 (init_named_socket, gdb_agent_helper_thread): Use union
907 gdb_sockaddr_u.
908
aac331e4
PA
9092015-03-07 Pedro Alves <palves@redhat.com>
910
911 * configure.ac (build_warnings): Move
912 -Wdeclaration-after-statement to the C-specific set.
913 * configure: Regenerate.
914
366c75fc
PA
9152015-03-07 Pedro Alves <palves@redhat.com>
916
917 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
918 or <winsock2.h> here. Instead include "gdb_socket.h".
919 (remote_open): Use union gdb_sockaddr_u.
920 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
921 or <winsock2.h> here. Instead include "gdb_socket.h".
922 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
923 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
924 or <sys/un.h>.
925 (init_named_socket, gdb_agent_helper_thread): Use union
926 gdb_sockaddr_u.
927
492d29ea
PA
9282015-03-07 Pedro Alves <palves@redhat.com>
929
930 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
931 instead.
932
60a191ed
YQ
9332015-03-06 Yao Qi <yao.qi@linaro.org>
934
935 * linux-aarch64-low.c (aarch64_insert_point): Use
936 show_debug_regs as a boolean.
937 (aarch64_remove_point): Likewise.
938
f5771b1d
PA
9392015-03-05 Pedro Alves <palves@redhat.com>
940
941 * lynx-low.c (lynx_target_ops): Install NULL hooks for
942 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
943 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
944 * nto-low.c (nto_target_ops): Likewise.
945 * spu-low.c (spu_target_ops): Likewise.
946 * win32-low.c (win32_target_ops): Likewise.
947
3e572f71
PA
9482015-03-04 Pedro Alves <palves@redhat.com>
949
72f4393d 950 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
951 Decide whether a breakpoint triggered based on the SIGTRAP's
952 siginfo.si_code.
72f4393d
L
953 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
954 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
955 (linux_low_filter_event): Check for breakpoints before checking
956 watchpoints.
957 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
958 siginfo.si_code.
72f4393d
L
959 (linux_stopped_by_sw_breakpoint)
960 (linux_supports_stopped_by_sw_breakpoint)
961 (linux_stopped_by_hw_breakpoint)
962 (linux_supports_stopped_by_hw_breakpoint): New functions.
963 (linux_target_ops): Install new target methods.
3e572f71 964
1ec68e26
PA
9652015-03-04 Pedro Alves <palves@redhat.com>
966
967 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
968 * server.c (swbreak_feature, hwbreak_feature): New globals.
969 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
970 (captured_main): Clear swbreak_feature and hwbreak_feature.
971 * server.h (swbreak_feature, hwbreak_feature): Declare.
972 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
973 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
974 supports_stopped_by_hw_breakpoint>: New fields.
975 (target_supports_stopped_by_sw_breakpoint)
976 (target_stopped_by_sw_breakpoint)
977 (target_supports_stopped_by_hw_breakpoint)
978 (target_stopped_by_hw_breakpoint): Declare.
979
15c66dd6
PA
9802015-03-04 Pedro Alves <palves@redhat.com>
981
982 enum lwp_stop_reason -> enum target_stop_reason
983 * linux-low.c (check_stopped_by_breakpoint): Adjust.
984 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
985 (linux_wait_1, stuck_in_jump_pad_callback)
986 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
987 (linux_stopped_by_watchpoint):
988 * linux-low.h (enum lwp_stop_reason): Delete.
989 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
990 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
991
98fc70d6
YQ
9922015-03-04 Yao Qi <yao.qi@linaro.org>
993
994 * Makefile.in (SFILES): Add linux-aarch64-low.c.
995
dd2ac174
GB
9962015-03-03 Gary Benson <gbenson@redhat.com>
997
998 * hostio.c (handle_vFile): Fix prefix lengths.
999
d68e53f4
MM
10002015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1001
1002 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1003 ptr_bits.
1004
bf2d68ab
AA
10052015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1006
1007 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1008 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1009 (clean): Add "rm -f" for above C files.
1010 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1011 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1012 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1013 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1014 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1015 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1016 (init_registers_s390x_vx_linux64)
1017 (init_registers_s390x_tevx_linux64)
1018 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1019 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1020 declarations.
1021 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1022 (s390_store_vxrs_high): New functions.
1023 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1024 NT_S390_VXRS_HIGH.
1025 (s390_arch_setup): Add logic for selecting one of the new target
1026 descriptions. Activate the new vector regsets if applicable.
1027 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1028 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1029 and init_registers_s390x_tevx_linux64.
1030
c966a859
PA
10312015-03-01 Pedro Alves <palves@redhat.com>
1032
1033 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1034 parameter.
1035
4180215b
PA
10362015-02-27 Pedro Alves <palves@redhat.com>
1037
1038 * linux-x86-low.c (u_debugreg_offset): New function.
1039 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1040
749bab01
PA
10412015-02-27 Pedro Alves <palves@redhat.com>
1042
1043 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1044 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1045 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1046 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1047 (ps_lsetfpregs, ps_getpid)
1048 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1049 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1050 (ps_lsetxregs, ps_plog): Declare.
1051
3c14e5a3
PA
10522015-02-27 Pedro Alves <palves@redhat.com>
1053
1054 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1055 IP_AGENT_EXPORT_FUNC.
1056 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1057 IP_AGENT_EXPORT_FUNC.
1058 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1059 (IP_AGENT_EXPORT): Delete.
1060 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1061 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1062 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1063 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1064 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1065 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1066 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1067 (traceframe_read_count, traceframe_write_count)
1068 (traceframes_created, trace_state_variables, get_raw_reg)
1069 (get_trace_state_variable_value, set_trace_state_variable_value)
1070 (ust_loaded, helper_thread_id, cmd_buf): Use
1071 IPA_SYM_EXPORTED_NAME.
1072 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1073 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1074 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1075 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1076 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1077 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1078 EXTERN_C_PUSH/EXTERN_C_POP.
1079 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1080 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1081 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1082 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1083 (traceframe_write_count, traceframe_read_count)
1084 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1085 (about_to_request_buffer_space, get_trace_state_variable_value)
1086 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1087 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1088 EXTERN_C_PUSH/EXTERN_C_POP.
1089 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1090 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1091 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1092 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1093 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1094 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1095 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1096 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1097 Define.
1098 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1099 (IP_AGENT_EXPORT_VAR_DECL): Define.
1100 (tracing): Declare.
1101 (gdb_agent_get_raw_reg): Declare.
1102
fe978cb0
PA
11032015-02-27 Tom Tromey <tromey@redhat.com>
1104 Pedro Alves <palves@redhat.com>
1105
1106 Rename symbols whose names are reserved C++ keywords throughout.
1107
3bc3d82a
PA
11082015-02-27 Pedro Alves <palves@redhat.com>
1109
1110 * Makefile.in (COMPILER): New, get it from autoconf.
1111 (CXX): Get from autoconf instead.
1112 (COMPILE.pre): Use COMPILER.
1113 (CC-LD): Rename to ...
1114 (CC_LD): ... this. Use COMPILER.
1115 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1116 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1117 * acinclude.m4: Include build-with-cxx.m4.
1118 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1119 Disable -Werror by default if building in C++ mode.
1120 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1121 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1122 the C++ compiler. Save/restore CXXFLAGS too.
1123 * configure: Regenerate.
1124
07697489
PA
11252015-02-27 Pedro Alves <palves@redhat.com>
1126
1127 * acinclude.m4: Include libiberty.m4.
1128 * configure.ac: Call libiberty_INIT.
1129 * config.in, configure: Regenerate.
1130
9beb7c4e
PA
11312015-02-26 Pedro Alves <palves@redhat.com>
1132
1133 * linux-low.c (linux_wait_1): When incrementing the PC past a
1134 program breakpoint always use the_low_target.breakpoint_len as
1135 increment, rather than the maximum between that and
1136 the_low_target.decr_pc_after_break.
1137
8090aef2
PA
11382015-02-23 Pedro Alves <palves@redhat.com>
1139
1140 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1141 thread was doing a step-over; always adjust the PC if
1142 we stepped over a permanent breakpoint.
1143 (linux_wait_1): If we stepped over breakpoint that was on top of a
1144 permanent breakpoint, manually advance the PC past it.
1145
bc9540e8
PA
11462015-02-23 Pedro Alves <palves@redhat.com>
1147
1148 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1149 modes.
1150 (x86_fill_gregset, x86_store_gregset): Use it when handling
1151 $orig_eax.
1152
2db9a427
PA
11532015-02-20 Pedro Alves <palves@redhat.com>
1154
1155 * thread-db.c: Include "nat/linux-procfs.h".
1156 (thread_db_init): Skip listing new threads if the kernel supports
1157 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1158
afa8d396
PA
11592015-02-20 Pedro Alves <palves@redhat.com>
1160
1161 * linux-low.c (status_pending_p_callback): Use ptid_match.
1162
c9587f88
AT
11632015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1164
1165 PR breakpoints/16812
1166 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1167 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1168 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1169
b05ec7a5
AT
11702015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1171
1172 PR breakpoints/15956
1173 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1174
d33501a5
MM
11752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1176
1177 * linux-low.c (linux_low_btrace_conf): Print size.
1178 * server.c (handle_btrace_conf_general_set): New.
1179 (hanle_general_set): Call handle_btrace_conf_general_set.
1180 (handle_query): Report Qbtrace-conf:bts:size as supported.
1181
f4abbc16
MM
11822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1183
1184 * linux-low.c (linux_low_enable_btrace): Update parameters.
1185 (linux_low_btrace_conf): New.
1186 (linux_target_ops)<to_btrace_conf>: Initialize.
1187 * server.c (current_btrace_conf): New.
1188 (handle_btrace_enable): Rename to ...
1189 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1190 to target_enable_btrace. Update comment. Update users.
1191 (handle_qxfer_btrace_conf): New.
1192 (qxfer_packets): Add btrace-conf entry.
1193 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1194 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1195 (target_ops)<read_btrace_conf>: New.
1196 (target_enable_btrace): Update parameters.
1197 (target_read_btrace_conf): New.
1198
043c3577
MM
11992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1200
1201 * server.c (handle_btrace_general_set): Remove call to
1202 target_supports_btrace.
1203 (supported_btrace_packets): New.
1204 (handle_query): Call supported_btrace_packets.
1205 * target.h: include btrace-common.h.
1206 (btrace_target_info): Removed.
1207 (supports_btrace, target_supports_btrace): Update parameters.
1208
734b0e4b
MM
12092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1210
1211 * Makefile.in (SFILES): Add common/btrace-common.c.
1212 (OBS): Add common/btrace-common.o.
1213 (btrace-common.o): Add build rules.
1214 * linux-low: Include btrace-common.h.
1215 (linux_low_read_btrace): Use struct btrace_data. Call
1216 btrace_data_init and btrace_data_fini.
1217
d6c146e9
PA
12182015-02-06 Pedro Alves <palves@redhat.com>
1219
1220 * thread-db.c (find_new_threads_callback): Add debug output.
1221
20ba1ce6
PA
12222015-02-04 Pedro Alves <palves@redhat.com>
1223
1224 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1225 (resume_stopped_resumed_lwps): New function.
1226 (linux_wait_for_event_filtered): Use it.
1227
8cc73a39
SDJ
12282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1229
1230 * Makefile.in (SFILES): Add linux-personality.c.
1231 (linux-personality.o): New rule.
1232 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1233 list of objects to be built.
1234 * linux-low.c: Include nat/linux-personality.h.
1235 (linux_create_inferior): Remove code to disable address space
1236 randomization (moved to ../nat/linux-personality.c). Create
1237 cleanup to disable address space randomization.
1238
fb23d554
SDJ
12392015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1240
1241 * Makefile.in (posix-strerror.o): New rule.
1242 (mingw-strerror.o): Likewise.
1243 * configure: Regenerated.
1244 * configure.ac: Source file ../common/common.host. Initialize new
1245 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1246
cdf43629
YQ
12472015-01-14 Yao Qi <yao@codesourcery.com>
1248
1249 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1250 (ppc-linux.o): New rule.
1251 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1252 * configure.ac: AC_CHECK_FUNCS(getauxval).
1253 * config.in: Re-generated.
1254 * configure: Re-generated.
1255 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1256 ppc64_64bit_inferior_p
1257
514c5338
YQ
12582015-01-14 Yao Qi <yao@codesourcery.com>
1259
1260 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1261 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1262 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1263 (PT_ORIG_R3, PT_TRAP): Likewise.
1264 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1266 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1267
3368c1e5
JB
12682015-01-10 Joel Brobecker <brobecker@adacore.com>
1269
1270 * i387-fp.c (i387_cache_to_xsave): In look over
1271 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1272 zmmh_low_space field by use of zmmh_high_space.
1273
582511be
PA
12742015-01-09 Pedro Alves <palves@redhat.com>
1275
1276 * linux-low.c (step_over_bkpt): Move higher up in the file.
1277 (handle_extended_wait): Don't store the stop_pc here.
1278 (get_stop_pc): Adjust comments and rename to ...
1279 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1280 stopped for a software breakpoint or hardware breakpoint.
1281 (thread_still_has_status_pending_p): New function.
1282 (status_pending_p_callback): Use
1283 thread_still_has_status_pending_p. If the event is no longer
1284 interesting, resume the LWP.
1285 (handle_tracepoints): Add assert.
1286 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1287 (wstatus_maybe_breakpoint): New function.
1288 (cancel_breakpoint): Delete function.
1289 (check_stopped_by_watchpoint): New function, factored out from
1290 linux_low_filter_event.
1291 (lp_status_maybe_breakpoint): Delete function.
1292 (linux_low_filter_event): Remove filter_ptid argument.
1293 Leave thread group exits pending here. Store the LWP's stop PC.
1294 Always leave events pending.
1295 (linux_wait_for_event_filtered): Pull all events out of the
1296 kernel, and leave them all pending.
1297 (count_events_callback, select_event_lwp_callback): Consider all
1298 events.
1299 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1300 (select_event_lwp): Only give preference to the stepping LWP in
1301 all-stop mode. Adjust comments.
1302 (ignore_event): New function.
1303 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1304 references to cancel_breakpoints. Adjust to renames. Also give
1305 equal priority to all LWPs that have had events in non-stop mode.
1306 If reporting a software breakpoint event, unadjust the LWP's PC.
1307 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1308 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1309 Adjust.
1310 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1311 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1312 (linux_stopped_by_watchpoint): Adjust.
1313 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1314 * linux-low.h (enum lwp_stop_reason): New.
1315 (struct lwp_info) <stop_pc>: Adjust comment.
1316 <stopped_by_watchpoint>: Delete field.
1317 <stop_reason>: New field.
1318 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1319 * mem-break.c (software_breakpoint_inserted_here)
1320 (hardware_breakpoint_inserted_here): New function.
1321 * mem-break.h (software_breakpoint_inserted_here)
1322 (hardware_breakpoint_inserted_here): Declare.
1323 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1324 (cancel_breakpoints): Delete.
1325 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1326 (upload_fast_traceframes): Remove references to
1327 cancel_breakpoints.
1328
a33e3959
PA
13292015-01-09 Pedro Alves <palves@redhat.com>
1330
1331 * thread-db.c (find_new_threads_callback): Ignore thread if the
1332 kernel thread ID is -1.
1333
8784d563
PA
13342015-01-09 Pedro Alves <palves@redhat.com>
1335
1336 * linux-low.c (linux_attach_fail_reason_string): Move to
1337 nat/linux-ptrace.c, and rename.
1338 (linux_attach_lwp): Update comment.
1339 (attach_proc_task_lwp_callback): New function.
1340 (linux_attach): Adjust to rename and use
1341 linux_proc_attach_tgid_threads.
1342 (linux_attach_fail_reason_string): Delete declaration.
1343
76f2b779
JB
13442015-01-01 Joel Brobecker <brobecker@adacore.com>
1345
1346 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1347 * server.c (gdbserver_version): Likewise.
1348
fafcc06a
SDJ
13492014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1350
1351 * remote-utils.c: Include ctype.h.
1352 (input_interrupt): Explicitly handle the case when the char
1353 received is the NUL byte. Improve the printing of non-ASCII
1354 characters.
1355
beed38b8
JB
13562014-12-16 Joel Brobecker <brobecker@adacore.com>
1357
1358 * linux-low.c (linux_low_filter_event): Update call to
1359 linux_enable_event_reporting following the addition of
1360 a new parameter to that function.
1361
bf330350
CU
13622014-12-16 Catalin Udma <catalin.udma@freescale.com>
1363
1364 PR server/17457
1365 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1366 (AARCH64_FPCR_REGNO): Likewise.
1367 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1368 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1369 (aarch64_store_fpregset): Likewise.
1370
5227d625
JB
13712014-12-15 Joel Brobecker <brobecker@adacore.com>
1372
1373 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1374 Remove FIXME comment about assumption about N.
1375
f93b65a0
JB
13762014-12-13 Joel Brobecker <brobecker@adacore.com>
1377
1378 * configure.ac: If large-file support is disabled in GDBserver,
1379 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1380 * configure: Regenerate.
1381
e5a9158d
AA
13822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1383
1384 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1385 warning upon ENODATA from ptrace.
1386 * linux-s390-low.c (s390_store_tdb): New.
1387 (s390_regsets): Add regset for NT_S390_TDB.
1388
feea5f36
AA
13892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1390
1391 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1392 without a fill_function.
1393 * linux-s390-low.c (s390_fill_last_break): Remove.
1394 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1395 (s390_arch_setup): Use regset's size instead of fill_function for
1396 loop end condition.
1397
098dbe61
AA
13982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1399
1400 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1401 the regset's store function when ptrace returned an error.
1402 * regcache.c (get_thread_regcache): Invalidate register cache
1403 before fetching inferior's registers.
1404
28eef672
AA
14052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1406
1407 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1408 while-loop as for-loop.
1409 (regsets_store_inferior_registers): Likewise.
1410
bdca27a2
YQ
14112014-11-28 Yao Qi <yao@codesourcery.com>
1412
1413 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1414 * config.in, configure: Re-generate.
1415 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1416 is defined.
1417
9c232dda
YQ
14182014-11-21 Yao Qi <yao@codesourcery.com>
1419
1420 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1421 (AC_CHECK_HEADERS): Remove malloc.h.
1422 * configure: Re-generated.
1423 * config.in: Re-generated.
1424 * server.h: Don't include alloca.h and malloc.h.
1425 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1426 Don't include malloc.h.
1427
43968415
JB
14282014-11-17 Joel Brobecker <brobecker@adacore.com>
1429
1430 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1431 corresponding ERRNO check in same block.
1432
40e91bc7
PA
14332014-11-12 Pedro Alves <palves@redhat.com>
1434
1435 * server.c (cont_thread): Update comment.
1436 (start_inferior, attach_inferior): No longer clear cont_thread.
1437 (handle_v_cont): No longer set cont_thread.
1438 (captured_main): Clear cont_thread each time a GDB connects.
1439
c2c118cf
PA
14402014-11-12 Pedro Alves <palves@redhat.com>
1441
1442 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1443 thread, and don't resume all threads if the Hc thread has exited.
1444
78708b7c
PA
14452014-11-12 Pedro Alves <palves@redhat.com>
1446
1447 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1448 the process group instead of to a specific LWP.
1449
a2abc7de
PA
14502014-10-15 Pedro Alves <palves@redhat.com>
1451
1452 PR server/17487
1453 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1454 parameter.
1455 (arm_set_thread_context): Delete.
1456 (the_low_target): Adjust.
1457 * win32-i386-low.c (debug_registers_changed)
1458 (debug_registers_used): Delete.
1459 (update_debug_registers_callback): New function.
1460 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1461 needing to update their debug registers.
1462 (win32_get_current_dr): New function.
1463 (x86_dr_low_get_addr, x86_dr_low_get_control)
1464 (x86_dr_low_get_status): Fetch the debug register from the thread
1465 record's context.
1466 (i386_initial_stuff): Adjust.
1467 (i386_get_thread_context): Remove current_event parameter. Don't
1468 clear debug_registers_changed nor copy DR values to
1469 debug_reg_state.
1470 (i386_set_thread_context): Delete.
1471 (i386_prepare_to_resume): New function.
1472 (i386_thread_added): Mark the thread as needing to update irs
1473 debug registers.
1474 (the_low_target): Remove i386_set_thread_context and install
1475 i386_prepare_to_resume.
1476 * win32-low.c (win32_get_thread_context): Adjust.
1477 (win32_set_thread_context): Use SetThreadContext
1478 directly.
1479 (win32_prepare_to_resume): New function.
1480 (win32_require_context): New function, factored out from ...
1481 (thread_rec): ... this.
1482 (continue_one_thread): Call win32_prepare_to_resume on each thread
1483 we're about to continue.
1484 (win32_resume): Call win32_prepare_to_resume on the event thread.
1485 * win32-low.h (struct win32_thread_info)
1486 <debug_registers_changed>: New field.
1487 (struct win32_target_ops): Change prototype of set_thread_context,
1488 delete set_thread_context and add prepare_to_resume.
1489 (win32_require_context): New declaration.
1490
a442d071
GB
14912014-10-08 Gary Benson <gbenson@redhat.com>
1492
1493 * server.h: Do not include common-exceptions.h.
1494
6f1947e8
GB
14952014-10-08 Gary Benson <gbenson@redhat.com>
1496
1497 * server.h: Do not include cleanups.h.
1498
63b434a4
JH
14992014-09-30 James Hogan <james.hogan@imgtec.com>
1500
1501 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1502 mips64-dsp-linux.c.
1503
c4d9ceb6
YQ
15042014-09-23 Yao Qi <yao@codesourcery.com>
1505
1506 * linux-low.c (lp_status_maybe_breakpoint): New function.
1507 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1508 (count_events_callback): Likewise.
1509 (select_event_lwp_callback): Likewise.
1510 (cancel_breakpoints_callback): Likewise.
1511
89a5711c
DB
15122014-09-19 Don Breazeal <donb@codesourcery.com>
1513
1514 * linux-low.c (handle_extended_wait): Call
1515 linux_ptrace_get_extended_event.
1516 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1517 linux_is_extended_waitstatus.
1518
bffc0964
JB
15192014-09-16 Joel Brobecker <brobecker@adacore.com>
1520
1521 * Makefile.in (CPPFLAGS): Define.
1522 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1523 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1524
0bfdf32f
GB
15252014-09-16 Gary Benson <gbenson@redhat.com>
1526
1527 * inferiors.h (current_inferior): Renamed as...
1528 (current_thread): New variable. All uses updated.
1529 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1530 (maybe_move_out_of_jump_pad): Likewise.
1531 (cancel_breakpoint): Likewise.
1532 (linux_low_filter_event): Likewise.
1533 (wait_for_sigstop): Likewise.
1534 (linux_resume_one_lwp): Likewise.
1535 (need_step_over_p): Likewise.
1536 (start_step_over): Likewise.
1537 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1538 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1539 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1540 and save_inferior as saved_thread.
1541 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1542 saved_thread.
1543 (regcache_invalidate_thread): Likewise.
1544 * remote-utils.c (prepare_resume_reply): Likewise.
1545 * thread-db.c (thread_db_get_tls_address): Likewise.
1546 (disable_thread_event_reporting): Likewise.
1547 (remove_thread_event_breakpoints): Likewise.
1548 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1549 as saved_thread.
1550 * target.h (set_desired_inferior): Renamed as...
1551 (set_desired_thread): New declaration. All uses updated.
1552 * server.c (myresume): Updated comment to reference thread instead
1553 of inferior.
1554 (handle_serial_event): Likewise.
1555 (handle_target_event): Likewise.
1556
361c8ade
GB
15572014-09-12 Tom Tromey <tromey@redhat.com>
1558 Gary Benson <gbenson@redhat.com>
1559
1560 * regcache.h: Include common-regcache.h.
1561 (regcache_read_pc): Don't declare.
1562 * regcache.c (get_thread_regcache_for_ptid): New function.
1563
bd9269f7
GB
15642014-09-11 Tom Tromey <tromey@redhat.com>
1565 Gary Benson <gbenson@redhat.com>
1566
1567 * symbol.c: New file.
1568 * Makefile.in (SFILES): Add symbol.c.
1569 (OBS): Add symbol.o.
1570
f8c1d06b
GB
15712014-09-11 Gary Benson <gbenson@redhat.com>
1572
1573 * target.c (target_stop_ptid, target_continue_ptid): New
1574 functions.
1575
721ec300
GB
15762014-09-11 Tom Tromey <tromey@redhat.com>
1577 Gary Benson <gbenson@redhat.com>
1578
1579 * target.h: Include target/target.h.
1580 * target.c (target_read_memory, target_read_uint32)
1581 (target_write_memory): New functions.
1582
c5e92cca
GB
15832014-09-11 Gary Benson <gbenson@redhat.com>
1584
1585 * server.h (debug_hw_points): Don't declare.
1586 * server.c (debug_hw_points): Don't define. Replace all uses
1587 with show_debug_regs.
1588 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1589 all uses with show_debug_regs.
1590
2e4bb98a
EBM
15912014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1592
1593 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1594 endianness into account.
1595 (ppc_supply_ptrace_register): Likewise.
1596
ac740bc7
JH
15972014-09-03 James Hogan <james.hogan@imgtec.com>
1598
1599 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1600 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1601
97ea6506
GB
16022014-09-03 Gary Benson <gbenson@redhat.com>
1603
1604 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1605 ALL_DEBUG_ADDRESS_REGISTERS.
1606
df7e5265
GB
16072014-09-02 Gary Benson <gbenson@redhat.com>
1608
1609 * i386-low.h: Renamed as...
1610 * x86-low.h: New file. All type, function and variable name
1611 prefixes changed from "i386_" to "x86_". All references updated.
1612 * i386-low.c: Renamed as...
1613 * x86-low.c: New file. All type, function and variable name
1614 prefixes changed from "i386_" to "x86_". All references updated.
1615
ed859da7
GB
16162014-09-02 Gary Benson <gbenson@redhat.com>
1617
1618 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1619 (x86_linux_new_thread): Likewise.
1620
860789c7
GB
16212014-08-29 Gary Benson <gbenson@redhat.com>
1622
1623 * server.h (setjmp.h): Do not include.
1624 (toplevel): Do not declare.
1625 (common-exceptions.h): Include.
1626 (cleanups.h): Likewise.
1627 * server.c (toplevel): Do not define.
1628 (exit_code): New static global.
1629 (detach_or_kill_for_exit_cleanup): New function.
1630 (main): New function. Original main renamed to...
1631 (captured_main): New function.
1632 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1633
ff55e1b5
GB
16342014-08-29 Gary Benson <gbenson@redhat.com>
1635
1636 * Makefile.in (SFILES): Add common/common-exceptions.c.
1637 (OBS): Add common-exceptions.o.
1638 (common-exceptions.o): New rule.
1639 * utils.c (prepare_to_throw_exception): New function.
1640
e9bcb658
GB
16412014-08-29 Gary Benson <gbenson@redhat.com>
1642
1643 * config.in: Regenerate.
1644 * configure: Likewise.
1645
e3180625
GB
16462014-08-29 Gary Benson <gbenson@redhat.com>
1647
1648 * Makefile.in (SFILES): Add common/cleanups.c.
1649 (OBS): cleanups.o.
1650 (cleanups.o): New rule.
1651
e3d6ba5d
GB
16522014-08-29 Gary Benson <gbenson@redhat.com>
1653
1654 * utils.c (internal_vwarning): New function.
1655
7096e886
GB
16562014-08-28 Gary Benson <gbenson@redhat.com>
1657
1658 * utils.h (fatal): Remove declaration.
1659 * utils.c (fatal): Remove function.
1660
14ce3192
GB
16612014-08-28 Gary Benson <gbenson@redhat.com>
1662
1663 * tracepoint.c (gdb_agent_init): Replace fatal with
1664 perror_with_name.
1665 (initialize_tracepoint): Likewise.
1666
50278d59
GB
16672014-08-28 Gary Benson <gbenson@redhat.com>
1668
1669 * remote-utils.c (remote_prepare): Replace fatal with error.
1670
aa96c426
GB
16712014-08-28 Gary Benson <gbenson@redhat.com>
1672
1673 * linux-low.c (linux_async): Replace fatal with warning.
1674 Tidy up and return.
1675 (linux_start_non_stop): Return -1 if linux_async failed.
1676
f7160e97
GB
16772014-08-28 Gary Benson <gbenson@redhat.com>
1678
1679 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1680 gdb_assert.
1681 (i386_dr_low_get_addr): Remove vague comment.
1682 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1683 gdb_assert.
1684
38e08fca
GB
16852014-08-28 Gary Benson <gbenson@redhat.com>
1686
1687 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1688 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1689 internal_error.
1690 (linux_resume_one_lwp): Likewise.
1691 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1692 gdb_assert.
1693 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1694 with internal_error.
1695 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1696 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1697 (find_register_by_name): Replace fatal with internal_error.
1698 (find_regno): Likewise.
1699 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1700 * thread-db.c (thread_db_create_event): Likewise.
1701 (thread_db_load_search): Likewise.
1702 (try_thread_db_load_1): Likewise.
1703 * tracepoint.c (get_jump_space_head): Replace fatal with
1704 internal_error.
1705 (claim_trampoline_space): Likewise.
1706 (have_fast_tracepoint_trampoline_buffer): Likewise.
1707 (cmd_qtstart): Likewise.
1708 (stop_tracing): Likewise.
1709 (fast_tracepoint_collecting): Likewise.
1710 (target_malloc): Likewise.
1711 (download_tracepoint): Likewise.
1712 (download_trace_state_variables): Replace check with gdb_assert.
1713 (upload_fast_traceframes): Replace fatal with internal_error.
1714
34abf635
GB
17152014-08-19 Tom Tromey <tromey@redhat.com>
1716 Gary Benson <gbenson@redhat.com>
1717
1718 * Makefile.in (SFILES): Add common/common-debug.c.
1719 (OBS): Add common-debug.o.
1720 (common-debug.o): New rule.
1721 * debug.h (debug_printf): Don't declare.
1722 * debug.c (debug_printf): Renamed and rewritten as...
1723 (debug_vprintf): New function.
1724
f6e94d78
GB
17252014-08-19 Gary Benson <gbenson@redhat.com>
1726
1727 * utils.h: Do not include print-utils.h.
1728
9239eeab
GB
17292014-08-19 Tom Tromey <tromey@redhat.com>
1730 Gary Benson <gbenson@redhat.com>
1731
1732 * server.h: Add static assertion.
1733 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1734
ef87c8bb
GB
17352014-08-19 Tom Tromey <tromey@redhat.com>
1736 Gary Benson <gbenson@redhat.com>
1737
1738 * Makefile.in (SFILES): Add common/errors.c.
1739 (OBS): Add errors.o.
1740 (IPA_OBS): Add errors-ipa.o.
1741 (errors.o): New rule.
1742 (errors-ipa.o): Likewise.
1743 * utils.h (perror_with_name, error, warning): Don't declare.
1744 * utils.c (warning): Renamed and rewritten as...
1745 (vwarning): New function.
1746 (error): Renamed and rewritten as...
1747 (verror): New function.
1748 (internal_error): Renamed and rewritten as...
1749 (internal_verror): New function.
1750
bb974a24
GB
17512014-08-07 Gary Benson <gbenson@redhat.com>
1752
1753 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1754 * configure: Regenerate.
1755 * config.in: Likewise.
1756 * server.h: Do not include errno.h.
1757 * event-loop.c: Likewise.
1758 * hostio-errno.c: Likewise.
1759 * linux-low.c: Likewise.
1760 * remote-utils.c: Likewise.
1761 * spu-low.c: Likewise.
1762 * utils.c: Likewise.
1763 * gdbreplay.c: Unconditionally include errno.h.
1764
6d3d12eb
GB
17652014-08-07 Gary Benson <gbenson@redhat.com>
1766
1767 * server.h: Do not include string.h.
1768 * event-loop.c: Likewise.
1769 * linux-low.c: Likewise.
1770 * regcache.c: Likewise.
1771 * remote-utils.c: Likewise.
1772 * spu-low.c: Likewise.
1773 * utils.c: Likewise.
1774
dccbb609
GB
17752014-08-07 Gary Benson <gbenson@redhat.com>
1776
1777 * server.h: Do not include gdb_assert.h.
1778
e76df0d0
GB
17792014-08-07 Gary Benson <gbenson@redhat.com>
1780
1781 * server.h: Do not include common-utils.h.
1782
4cb9c816
GB
17832014-08-07 Gary Benson <gbenson@redhat.com>
1784
1785 * server.h: Do not include ptid.h.
1786 * notif.h: Likewise.
1787
3995eeee
GB
17882014-08-07 Gary Benson <gbenson@redhat.com>
1789
1790 * server.h: Do not include gdb_locale.h.
1791
cb9f1a9b
GB
17922014-08-07 Gary Benson <gbenson@redhat.com>
1793
1794 * server.h: Do not include gdb/signals.h.
1795 * win32-low.c: Likewise.
1796
a5fceff8
GB
17972014-08-07 Gary Benson <gbenson@redhat.com>
1798
1799 * server.h: Do not include pathmax.h.
1800
b9391142
GB
18012014-08-07 Gary Benson <gbenson@redhat.com>
1802
1803 * server.h: Do not include libiberty.h.
1804 * linux-bfin-low.c: Likewise.
1805
0e443c87
GB
18062014-08-07 Gary Benson <gbenson@redhat.com>
1807
1808 * server.h: Do not include ansidecl.h.
1809
8ebb3f56
GB
18102014-08-07 Gary Benson <gbenson@redhat.com>
1811
1812 * linux-x86-low.c: Do not include stddef.h.
1813 * lynx-ppc-low.c: Likewise.
1814 * tracepoint.c: Likewise.
1815
8980bdf6
GB
18162014-08-07 Gary Benson <gbenson@redhat.com>
1817
1818 * server.h: Do not include stdarg.h.
1819 * nto-low.c: Likewise.
1820
d7096f71
GB
18212014-08-07 Gary Benson <gbenson@redhat.com>
1822
1823 * server.h: Do not include stdlib.h.
1824 * inferiors.c: Likewise.
1825 * linux-low.c: Likewise.
1826 * regcache.c: Likewise.
1827 * spu-low.c: Likewise.
1828 * tracepoint.c: Likewise.
1829 * utils.c: Likewise.
1830
d02f550d
GB
18312014-08-07 Gary Benson <gbenson@redhat.com>
1832
1833 * server.h: Do not include stdio.h.
1834 * linux-low.c: Likewise.
1835 * remote-utils.c: Likewise.
1836 * spu-low.c: Likewise.
1837 * utils.c: Likewise.
1838 * wincecompat.c: Likewise.
1839
87f6c4e3
GB
18402014-08-06 Gary Benson <gbenson@redhat.com>
1841
1842 * regcache.c (init_register_cache): Move conditionals inside if.
1843
7089dca4
GB
18442014-08-06 Gary Benson <gbenson@redhat.com>
1845
1846 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1847
462f517e
GB
18482014-07-31 Gary Benson <gbenson@redhat.com>
1849
1850 * ax.h: Do not include server.h.
1851 * gdbthread.h: Likewise.
1852 * lynx-low.h: Likewise.
1853 * notif.h: Likewise.
1854
976411d6
GB
18552014-07-30 Gary Benson <gbenson@redhat.com>
1856
1857 * server.h: Include common-defs.h.
1858 Do not include config.h or build-gnulib-gdbserver/config.h.
1859
d41f6d8e
GB
18602014-07-30 Gary Benson <gbenson@redhat.com>
1861
1862 * hostio-errno.c: Move server.h to top of includes list.
1863 * inferiors.c: Likewise.
1864 * linux-x86-low.c: Likewise.
1865 * notif.c: Include server.h.
1866
314c6a35
TT
18672014-07-24 Tom Tromey <tromey@redhat.com>
1868 Gary Benson <gbenson@redhat.com>
1869
1870 * server.h (CORE_ADDR): Now unsigned.
1871
69ff6be5
PA
18722014-07-16 Pedro Alves <palves@redhat.com>
1873
1874 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1875
ce9e3fe7
PA
18762014-07-15 Pedro Alves <palves@redhat.com>
1877
1878 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1879 copy.
1880
e76126e8
PA
18812014-07-11 Pedro Alves <palves@redhat.com>
1882
1883 * linux-low.c (kill_wait_lwp): New function, based on
1884 kill_one_lwp_callback, but use my_waitpid directly.
1885 (kill_one_lwp_callback, linux_kill): Use it.
1886
8e9db26e
PA
18872014-06-23 Pedro Alves <palves@redhat.com>
1888
1889 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1890 before setting DR0..DR3.
1891
698b3e08
GB
18922014-06-20 Gary Benson <gbenson@redhat.com>
1893
1894 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1895 * configure: Regenerated.
1896 * config.in: Likewise.
1897
125f8a3d
GB
18982014-06-20 Gary Benson <gbenson@redhat.com>
1899
1900 * Makefile.in (SFILES): Update locations for files moved
1901 from common to nat.
1902 (object file files): Reordered.
1903
42995dbd
GB
19042014-06-20 Gary Benson <gbenson@redhat.com>
1905
1906 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1907 (i386_dr_low_set_addr): Likewise.
1908 (i386_dr_low_get_addr): Likewise.
1909 (i386_dr_low_can_set_control): Likewise.
1910 (i386_dr_low_set_control): Likewise.
1911 (i386_dr_low_get_control): Likewise.
1912 (i386_dr_low_get_status): Likewise.
1913 (i386_get_debug_register_length): Likewise.
1914 * linux-x86-low.c (i386_dr_low_set_addr):
1915 Changed signature. Made static.
1916 (i386_dr_low_get_addr): Likewise.
1917 (i386_dr_low_set_control): Likewise.
1918 (i386_dr_low_get_control): Likewise.
1919 (i386_dr_low_get_status): Likewise.
1920 (i386_dr_low): New global variable.
1921 * win32-i386-low.c (i386_dr_low_set_addr):
1922 Changed signature. Made static.
1923 (i386_dr_low_get_addr): Likewise.
1924 (i386_dr_low_set_control): Likewise.
1925 (i386_dr_low_get_control): Likewise.
1926 (i386_dr_low_get_status): Likewise.
1927 (i386_dr_low): New global variable.
1928
e1d2394b
MS
19292014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1930
1931 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1932 * Makefile.in (AR, AR_FLAGS): Define.
1933 * configure: Regenerate.
1934
3a8ee006
GB
19352014-06-19 Gary Benson <gbenson@redhat.com>
1936
1937 * Makefile.in (i386-dregs.o): New rule.
1938 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1939 * i386-low.c (target.h): Remove include.
1940 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1941 (DR_CONTROL_SHIFT): Likewise.
1942 (DR_CONTROL_SIZE): Likewise.
1943 (DR_RW_EXECUTE): Likewise.
1944 (DR_RW_WRITE): Likewise.
1945 (DR_RW_READ): Likewise.
1946 (DR_RW_IORW): Likewise.
1947 (DR_LEN_1): Likewise.
1948 (DR_LEN_2): Likewise.
1949 (DR_LEN_4): Likewise.
1950 (DR_LEN_8): Likewise.
1951 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1952 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1953 (DR_ENABLE_SIZE): Likewise.
1954 (DR_LOCAL_SLOWDOWN): Likewise.
1955 (DR_GLOBAL_SLOWDOWN): Likewise.
1956 (DR_CONTROL_RESERVED): Likewise.
1957 (I386_DR_CONTROL_MASK): Likewise.
1958 (I386_DR_VACANT): Likewise.
1959 (I386_DR_LOCAL_ENABLE): Likewise.
1960 (I386_DR_GLOBAL_ENABLE): Likewise.
1961 (I386_DR_DISABLE): Likewise.
1962 (I386_DR_SET_RW_LEN): Likewise.
1963 (I386_DR_GET_RW_LEN): Likewise.
1964 (I386_DR_WATCH_HIT): Likewise.
1965 (i386_wp_op_t): Likewise.
1966 (i386_show_dr): Likewise.
1967 (i386_length_and_rw_bits): Likewise.
1968 (i386_insert_aligned_watchpoint): Likewise.
1969 (i386_remove_aligned_watchpoint): Likewise.
1970 (i386_handle_nonaligned_watchpoint): Likewise.
1971 i386_update_inferior_debug_regs(): Likewise.
1972 (i386_dr_insert_watchpoint): Likewise.
1973 (i386_dr_remove_watchpoint): Likewise.
1974 (i386_dr_region_ok_for_watchpoint): Likewise.
1975 (i386_dr_stopped_data_address): Likewise.
1976 (i386_dr_stopped_by_watchpoint): Likewise.
1977
8f26655c
GB
19782014-06-19 Gary Benson <gbenson@redhat.com>
1979
1980 * i386-low.c (i386_dr_show): Renamed to
1981 i386_show_dr and made static. All uses updated.
1982 (i386_dr_length_and_rw_bits): Renamed to
1983 i386_length_and_rw_bits and made static.
1984 All uses updated.
1985 (i386_dr_insert_aligned_watchpoint): Renamed to
1986 i386_insert_aligned_watchpoint and made static.
1987 All uses updated.
1988 (i386_dr_remove_aligned_watchpoint): Renamed to
1989 i386_remove_aligned_watchpoint and made static.
1990 All uses updated.
1991 (i386_dr_update_inferior_debug_regs): Renamed to
1992 i386_update_inferior_debug_regs and made static.
1993 All uses updated.
1994
b9228891
GB
19952014-06-18 Gary Benson <gbenson@redhat.com>
1996
5171def3
GB
1997 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1998 (i386_dr_low_can_set_control): Likewise.
1999 (i386_get_debug_register_length): Likewise.
2000 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2001 (i386_dr_low_can_set_control): Likewise.
2002 (i386_get_debug_register_length): Likewise.
2003
20042014-06-17 Gary Benson <gbenson@redhat.com>
2005
b9228891
GB
2006 * i386-low.h (i386-dregs.h): New include.
2007 (DR_FIRSTADDR): Now in i386-dregs.h.
2008 (DR_LASTADDR): Likewise.
2009 (DR_NADDR): Likewise.
2010 (DR_STATUS): Likewise.
2011 (DR_CONTROL): Likewise.
2012 (i386_debug_reg_state): Likewise.
2013 (i386_dr_insert_watchpoint): Likewise.
2014 (i386_dr_remove_watchpoint): Likewise.
2015 (i386_dr_region_ok_for_watchpoint): Likewise.
2016 (i386_dr_stopped_data_address): Likewise.
2017 (i386_dr_stopped_by_watchpoint): Likewise.
2018 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2019
4be83cc2
GB
20202014-06-18 Gary Benson <gbenson@redhat.com>
2021
2022 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2023 i386_dr_insert_watchpoint.
2024 (i386_low_remove_watchpoint): Renamed to
2025 i386_dr_remove_watchpoint.
2026 (i386_low_region_ok_for_watchpoint): Renamed to
2027 i386_dr_region_ok_for_watchpoint.
2028 (i386_low_stopped_data_address): Renamed to
2029 i386_dr_stopped_data_address.
2030 (i386_low_stopped_by_watchpoint): Renamed to
2031 i386_dr_stopped_by_watchpoint.
2032 * i386-low.c (i386_show_dr): Renamed to
2033 i386_dr_show and made nonstatic. All uses updated.
2034 (i386_length_and_rw_bits): Renamed to
2035 i386_dr_length_and_rw_bits and made nonstatic.
2036 All uses updated.
2037 (i386_insert_aligned_watchpoint): Renamed to
2038 i386_dr_insert_aligned_watchpoint and made nonstatic.
2039 All uses updated.
2040 (i386_remove_aligned_watchpoint): Renamed to
2041 i386_dr_remove_aligned_watchpoint and made nonstatic.
2042 All uses updated.
2043 (i386_update_inferior_debug_regs): Renamed to
2044 i386_dr_update_inferior_debug_regs and made nonstatic.
2045 All uses updated.
2046 (i386_low_insert_watchpoint): Renamed to
2047 i386_dr_insert_watchpoint. All uses updated.
2048 (i386_low_remove_watchpoint): Renamed to
2049 i386_dr_remove_watchpoint. All uses updated.
2050 (i386_low_region_ok_for_watchpoint): Renamed to
2051 i386_dr_region_ok_for_watchpoint. All uses updated.
2052 (i386_low_stopped_data_address): Renamed to
2053 i386_dr_stopped_data_address. All uses updated.
2054 (i386_low_stopped_by_watchpoint): Renamed to
2055 i386_dr_stopped_by_watchpoint. All uses updated.
2056
131aa0d4
GB
20572014-06-18 Gary Benson <gbenson@redhat.com>
2058
2059 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2060 (i386_dr_low_can_set_control): Likewise.
2061 (i386_insert_aligned_watchpoint): New check.
2062
d9305f7f
GB
20632014-06-18 Gary Benson <gbenson@redhat.com>
2064
2065 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2066 Renamed to state.
2067
e927c9fc
GB
20682014-06-18 Gary Benson <gbenson@redhat.com>
2069
2070 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2071 instead of fatal and error.
2072 (i386_handle_nonaligned_watchpoint): Likewise.
2073
1b6d4134
GB
20742014-06-18 Gary Benson <gbenson@redhat.com>
2075
2076 * i386-low.c (i386_get_debug_register_length): New macro.
2077 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2078 (i386_show_dr): Use debug_printf instead of fprintf. Use
2079 phex to format values.
2080
6e62758f
GB
20812014-06-18 Gary Benson <gbenson@redhat.com>
2082
2083 * i386-low.h: Comment changes.
2084 * i386-low.c: Likewise.
2085
fc6e2f03
GB
20862014-06-18 Gary Benson <gbenson@redhat.com>
2087
2088 * i386-low.c: Whitespace changes.
2089
f9d1eeed
TT
20902014-06-12 Tom Tromey <tromey@redhat.com>
2091
2092 * utils.c (freeargv): Remove.
2093
0b04e523
TT
20942014-06-12 Tom Tromey <tromey@redhat.com>
2095
2096 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2097 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2098 (parse_debug_format_options): Likewise.
2099 (gdbserver_usage): Likewise.
2100 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2101 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2102 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2103 against libiberty.
2104 ($(LIBGNU)): Depend on libiberty.
2105 (all-lib): Recurse into all subdirs.
2106 (install-only): Invoke "install" target in subdirs.
2107 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2108 targets.
2109 * configure: Rebuild.
2110 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2111 for vasprintf, vsnprintf, or gettimeofday.
2112 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2113 srv_tgtobj.
2114
270c9937
JB
21152014-06-05 Joel Brobecker <brobecker@adacore.com>
2116
2117 * development.sh: Delete.
2118 * Makefile.in (config.status): Adjust dependency on development.sh.
2119 * configure.ac: Adjust development.sh source call.
2120 * configure: Regenerate.
2121
0a261ed8
PA
21222014-06-02 Pedro Alves <palves@redhat.com>
2123
2124 * ax.c (gdb_free_agent_expr): New function.
2125 * ax.h (gdb_free_agent_expr): New declaration.
2126 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2127 list.
2128 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2129 static.
2130 (clear_breakpoint_conditions_and_commands): New function.
2131 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2132 (clear_breakpoint_conditions_and_commands): New declaration.
2133
e9dae05e
RR
21342014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2135
2136 * linux-aarch64-low.c (asm/ptrace.h): Include.
2137
5876f503
JK
21382014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2139
2140 Fix TLS access for -static -pthread.
2141 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2142 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2143 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2144
802e8e6d
PA
21452014-05-20 Pedro Alves <palves@redhat.com>
2146
2147 * linux-aarch64-low.c (aarch64_insert_point)
2148 (aarch64_remove_point): No longer check whether the type is
2149 supported here. Adjust to new interface.
2150 (the_low_target): Install aarch64_supports_z_point_type as
2151 supports_z_point_type method.
2152 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2153 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2154 instead of a Z packet char. Adjust.
2155 (arm_supports_z_point_type): New function.
2156 (arm_insert_point, arm_remove_point): Adjust to new interface.
2157 (the_low_target): Install arm_supports_z_point_type.
2158 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2159 (cris_insert_point, cris_remove_point): Adjust to new interface.
2160 Don't check whether the type is supported here.
2161 (the_low_target): Install cris_supports_z_point_type.
2162 * linux-low.c (linux_supports_z_point_type): New function.
2163 (linux_insert_point, linux_remove_point): Adjust to new interface.
2164 * linux-low.h (struct linux_target_ops) <insert_point,
2165 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2166 raw_breakpoint pointer parameter.
2167 <supports_z_point_type>: New method.
2168 * linux-mips-low.c (mips_supports_z_point_type): New function.
2169 (mips_insert_point, mips_remove_point): Adjust to new interface.
2170 Use mips_supports_z_point_type.
2171 (the_low_target): Install mips_supports_z_point_type.
2172 * linux-ppc-low.c (the_low_target): Install NULL as
2173 supports_z_point_type method.
2174 * linux-s390-low.c (the_low_target): Install NULL as
2175 supports_z_point_type method.
2176 * linux-sparc-low.c (the_low_target): Install NULL as
2177 supports_z_point_type method.
2178 * linux-x86-low.c (x86_supports_z_point_type): New function.
2179 (x86_insert_point): Adjust to new insert_point interface. Use
2180 insert_memory_breakpoint. Adjust to new
2181 i386_low_insert_watchpoint interface.
2182 (x86_remove_point): Adjust to remove_point interface. Use
2183 remove_memory_breakpoint. Adjust to new
2184 i386_low_remove_watchpoint interface.
2185 (the_low_target): Install x86_supports_z_point_type.
2186 * lynx-low.c (lynx_target_ops): Install NULL as
2187 supports_z_point_type callback.
2188 * nto-low.c (nto_supports_z_point_type): New.
2189 (nto_insert_point, nto_remove_point): Adjust to new interface.
2190 (nto_target_ops): Install nto_supports_z_point_type.
2191 * mem-break.c: Adjust intro comment.
2192 (struct raw_breakpoint) <raw_type, size>: New fields.
2193 <inserted>: Update comment.
2194 <shlib_disabled>: Delete field.
2195 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2196 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2197 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2198 (raw_bkpt_type_to_target_hw_bp_type): New function.
2199 (find_enabled_raw_code_breakpoint_at): New function.
2200 (find_raw_breakpoint_at): New type and size parameters. Use them.
2201 (insert_memory_breakpoint): New function, based off
2202 set_raw_breakpoint_at.
2203 (remove_memory_breakpoint): New function.
2204 (set_raw_breakpoint_at): Reimplement.
2205 (set_breakpoint): New, based on set_breakpoint_at.
2206 (set_breakpoint_at): Reimplement.
2207 (delete_raw_breakpoint): Go through the_target->remove_point
2208 instead of assuming memory breakpoints.
2209 (find_gdb_breakpoint_at): Delete.
2210 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2211 (find_gdb_breakpoint): New function.
2212 (set_gdb_breakpoint_at): Delete.
2213 (z_type_supported): New function.
2214 (set_gdb_breakpoint_1): New function, loosely based off
2215 set_gdb_breakpoint_at.
2216 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2217 (delete_gdb_breakpoint_at): Delete.
2218 (delete_gdb_breakpoint_1): New function, loosely based off
2219 delete_gdb_breakpoint_at.
2220 (delete_gdb_breakpoint): New function.
2221 (clear_gdb_breakpoint_conditions): Rename to ...
2222 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2223 breakpoint.
2224 (add_condition_to_breakpoint): Make static.
2225 (add_breakpoint_condition): Take a struct breakpoint pointer
2226 instead of an address. Adjust.
2227 (gdb_condition_true_at_breakpoint): Rename to ...
2228 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2229 z_type parameter.
2230 (gdb_condition_true_at_breakpoint): Reimplement.
2231 (add_breakpoint_commands): Take a struct breakpoint pointer
2232 instead of an address. Adjust.
2233 (gdb_no_commands_at_breakpoint): Rename to ...
2234 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2235 parameter. Return true if no breakpoint was found. Change debug
2236 output.
2237 (gdb_no_commands_at_breakpoint): Reimplement.
2238 (run_breakpoint_commands): Rename to ...
2239 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2240 and change return type to boolean.
2241 (run_breakpoint_commands): New function.
2242 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2243 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2244 breakpoint. Go through the_target->remove_point instead of
2245 assuming memory breakpoint.
2246 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2247 software and hardware breakpoints.
2248 (reinsert_raw_breakpoint): Go through the_target->insert_point
2249 instead of assuming memory breakpoint.
2250 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2251 software and hardware breakpoints.
2252 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2253 Check both software and hardware breakpoints.
2254 (validate_inserted_breakpoint): Assert the breakpoint is a
2255 software breakpoint. Set the inserted flag to -1 instead of
2256 setting shlib_disabled.
2257 (delete_disabled_breakpoints): Adjust.
2258 (validate_breakpoints): Only validate software breakpoints.
2259 Adjust to inserted flag change.
2260 (check_mem_read, check_mem_write): Skip breakpoint types other
2261 than software breakpoints. Adjust to inserted flag change.
2262 * mem-break.h (enum raw_bkpt_type): New enum.
2263 (raw_breakpoint, struct process_info): Forward declare.
2264 (Z_packet_to_target_hw_bp_type): Delete declaration.
2265 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2266 (set_gdb_breakpoint, delete_gdb_breakpoint)
2267 (clear_breakpoint_conditions): New declarations.
2268 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2269 (breakpoint_inserted_here): Update comment.
2270 (add_breakpoint_condition, add_breakpoint_commands): Replace
2271 address parameter with a breakpoint pointer parameter.
2272 (gdb_breakpoint_here): Update comment.
2273 (delete_gdb_breakpoint_at): Delete.
2274 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2275 * server.c (process_point_options): Take a struct breakpoint
2276 pointer instead of an address. Adjust.
2277 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2278 delete_gdb_breakpoint.
2279 * spu-low.c (spu_target_ops): Install NULL as
2280 supports_z_point_type method.
2281 * target.h: Include mem-break.h.
2282 (struct target_ops) <prepare_to_access_memory>: Update comment.
2283 <supports_z_point_type>: New field.
2284 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2285 instead of a char. Also take a raw breakpoint pointer.
2286 * win32-arm-low.c (the_low_target): Install NULL as
2287 supports_z_point_type.
2288 * win32-i386-low.c (i386_supports_z_point_type): New function.
2289 (i386_insert_point, i386_remove_point): Adjust to new interface.
2290 (the_low_target): Install i386_supports_z_point_type.
2291 * win32-low.c (win32_supports_z_point_type): New function.
2292 (win32_insert_point, win32_remove_point): Adjust to new interface.
2293 (win32_target_ops): Install win32_supports_z_point_type.
2294 * win32-low.h (struct win32_target_ops):
2295 <supports_z_point_type>: New method.
2296 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2297 instead of a char. Also take a raw breakpoint pointer.
2298
932539e3
PA
22992014-05-20 Pedro Alves <palves@redhat.com>
2300
2301 * mem-break.h: Include break-common.h.
2302 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2303 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2304 (Z_packet_to_target_hw_bp_type): New declaration.
2305 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2306 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2307 (Z_PACKET_ACCESS_WP): Delete macros.
2308 (Z_packet_to_hw_type): Delete function.
2309 * i386-low.h: Don't include break-common.h here.
2310 (Z_packet_to_hw_type): Delete declaration.
2311 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2312 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2313 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2314 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2315 * linux-aarch64-low.c: Don't include break-common.h here.
2316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2318 (Z_packet_to_target_hw_bp_type): Delete function.
2319 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2320 function.
2321 (mips_insert_point, mips_remove_point): Use
2322 Z_packet_to_target_hw_bp_type.
2323
4ff0d3d8
PA
23242014-05-20 Pedro Alves <palves@redhat.com>
2325
2326 * linux-aarch64-low.c: Include break-common.h.
2327 (enum target_point_type): Delete.
2328 (Z_packet_to_point_type): Rename to ...
2329 (Z_packet_to_target_hw_bp_type): ... this, and return a
2330 target_hw_bp_type instead.
2331 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2332 instead of an enum target_point_type.
2333 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2334 breakpoint type.
2335 (aarch64_dr_state_insert_one_point)
2336 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2337 (aarch64_handle_aligned_watchpoint)
2338 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2339 Take an enum target_hw_bp_type instead of an enum
2340 target_point_type.
2341 (aarch64_supports_z_point_type): New function.
2342 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2343 use Z_packet_to_target_hw_bp_type.
2344
786dc519
JB
23452014-05-20 Joel Brobecker <brobecker@adacore.com>
2346
2347 * configure.ac: Only use -Werror by default when DEVELOPMENT
2348 is true.
2349 * configure: Regenerate.
2350
9e0aa64f
JK
23512014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2352
2353 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2354 * linux-x86-low.c (X86_64_USER_REGS): New.
2355 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2356
2b577b92
YQ
23572014-04-28 Yao Qi <yao@codesourcery.com>
2358
2359 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2360 name.
2361
94611da2
PA
23622014-04-25 Pedro Alves <palves@redhat.com>
2363
2364 PR server/16255
2365 * linux-low.c (linux_attach_fail_reason_string): New function.
2366 (linux_attach_lwp): Delete.
2367 (linux_attach_lwp_1): Rename to ...
2368 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2369 argument. Remove "initial" parameter. Return int instead of
2370 void. Don't error or warn here.
2371 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2372 failure to attach to the tgid. Call warning when failing to
2373 attach to an lwp.
2374 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2375 argument. Remove "initial" parameter. Return int instead of
2376 void. Don't error or warn here.
2377 (linux_attach_fail_reason_string): New declaration.
2378 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2379 interface change. Use linux_attach_fail_reason_string.
2380
01f9f808
MS
23812014-04-24 Michael Sturm <michael.sturm@mintel.com>
2382 Walfred Tedeschi <walfred.tedeschi@intel.com>
2383
2384 * Makefile.in: Added rules to handle new files
2385 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2386 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2387 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2388 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2389 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2390 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2391 x32-avx512-linux.o.
2392 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2393 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2394 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2395 i386/x32-avx512.xml.
2396 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2397 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2398 i386/x32-avx512-linux.xml.
2399 * i387-fp.c (num_avx512_k_registers): New constant for number
2400 of K registers.
2401 (num_avx512_zmmh_low_registers): New constant for number of
2402 lower ZMM registers (0-15).
2403 (num_avx512_zmmh_high_registers): New constant for number of
2404 higher ZMM registers (16-31).
2405 (num_avx512_ymmh_registers): New contant for number of higher
2406 YMM registers (ymm16-31 added by avx521 on x86_64).
2407 (num_avx512_xmm_registers): New constant for number of higher
2408 XMM registers (xmm16-31 added by AVX512 on x86_64).
2409 (struct i387_xsave): Add space for AVX512 registers.
2410 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2411 Add code to handle AVX512 registers.
2412 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2413 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2414 prototypei from generated file.
2415 (tdesc_amd64_avx512_linux): Likewise.
2416 (init_registers_x32_avx512_linux): Likewise.
2417 (tdesc_x32_avx512_linux): Likewise.
2418 (init_registers_i386_avx512_linux): Likewise.
2419 (tdesc_i386_avx512_linux): Likewise.
2420 (x86_64_regmap): Add AVX512 registers.
2421 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2422 mask.
2423 (initialize_low_arch): Add code to initialize AVX512 registers.
2424
51aa91f9
PA
24252014-04-23 Pedro Alves <palves@redhat.com>
2426
2427 * mem-break.c (find_gdb_breakpoint_at): Make static.
2428 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2429
a4165e94
PA
24302014-04-23 Pedro Alves <palves@redhat.com>
2431
2432 * i386-low.c: Don't include break-common.h here.
2433 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2434 prototype to take target_hw_bp_type as argument instead of a Z
2435 packet char.
2436 * i386-low.h: Include break-common.h here.
2437 (Z_packet_to_hw_type): Declare.
2438 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2439 prototypes.
2440 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2441 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2442 (x86_remove_point): Convert the packet number to a
2443 target_hw_bp_type before calling i386_low_remove_watchpoint.
2444 * win32-i386-low.c (i386_insert_point): Convert the packet number
2445 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2446 (i386_remove_point): Convert the packet number to a
2447 target_hw_bp_type before calling i386_low_remove_watchpoint.
2448
b8acf843
PA
24492014-04-23 Pedro Alves <palves@redhat.com>
2450
2451 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2452
d708bcd1
PA
24532014-04-10 Pedro Alves <palves@redhat.com>
2454
2455 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2456 Check if the condition or command is NULL before checking if the
2457 breakpoint is known. On success, return true.
2458 * mem-break.h (add_breakpoint_condition): Document return.
2459 (add_breakpoint_commands): Add describing comment.
2460 * server.c (skip_to_semicolon): New function.
2461 (process_point_options): Use it.
2462
2eec7d5b
PA
24632014-04-09 Pedro Alves <palves@redhat.com>
2464
2465 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2466 to lwpid_of.
2467
fa96cb38
PA
24682014-02-27 Pedro Alves <palves@redhat.com>
2469
2470 PR 12702
2471 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2472 macros.
2473 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2474 output.
2475 (last_thread_of_process_p): Take a PID argument instead of a
2476 thread pointer.
2477 (linux_wait_for_lwp): Delete.
2478 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2479 functions.
2480 (linux_low_filter_event): New function, party factored out from
2481 linux_wait_for_event.
2482 (linux_wait_for_event): Rename to ...
2483 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2484 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2485 sigsuspend. Check for zombie leaders.
2486 (linux_wait_for_event): Reimplement as wrapper around
2487 linux_wait_for_event_filtered.
2488 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2489 a normal or signal exit is seen, it's the whole process exiting.
2490 (wait_for_sigstop): No longer a for_each_inferior callback.
2491 Rewrite on top of linux_wait_for_event_filtered.
2492 (stop_all_lwps): Call wait_for_sigstop directly.
2493 * server.c (resume, handle_target_event): Handle
2494 TARGET_WAITKIND_NO_RESUMED.
2495
d763de10
JB
24962014-02-26 Joel Brobecker <brobecker@adacore.com>
2497
2498 * win32-low.c (psapi_get_dll_name,
2499 * win32_CreateToolhelp32Snapshot): Delete.
2500 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2501 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2502 Delete.
2503 (handle_load_dll): Add function description.
2504 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2505
850a0f76
JB
25062014-02-26 Joel Brobecker <brobecker@adacore.com>
2507
2508 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2509 Add comment.
2510 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2511 base address when calling win32_add_one_solib.
2512 (handle_load_dll): Delete local variable load_addr.
2513 Remove 0x1000 offset applied to DLL base address when calling
2514 win32_add_one_solib.
2515 (handle_unload_dll): Add comment.
2516
f25b3fc3
JB
25172014-02-26 Joel Brobecker <brobecker@adacore.com>
2518
2519 * win32-low.c (win32_add_all_dlls): Renames
2520 win32_ensure_ntdll_loaded. Rewrite function documentation.
2521 Adjust implementation to always load all DLLs.
2522 Add 0x1000 offset to DLL base address when calling
2523 win32_add_one_solib.
2524 (child_initialization_done): New static global.
2525 (do_initial_child_stuff): Set child_initialization_done to
2526 zero during child initialization, and 1 after. Replace call
2527 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2528 Add comment.
2529 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2530 (handle_unload_dll): Add function documentation.
2531 (get_child_debug_event): Ignore load and unload DLL events
2532 during child initialization.
2533
d86d4aaf
DE
25342014-02-20 Doug Evans <dje@google.com>
2535
3bc32da3 2536 Remove global all_lwps.
d86d4aaf
DE
2537 * inferiors.h (ptid_of): Move here from linux-low.h.
2538 (pid_of, lwpid_of): Ditto.
2539 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2540 parameter is a struct thread_info * now.
2541 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2542 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2543 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2544 directly.
2545 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2546 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2547 * linux-arm-low.c (update_registers_callback): Update, "entry"
2548 parameter is a struct thread_info * now.
2549 Fetch lwpid from current_inferior directly.
2550 (arm_insert_point): Pass &all_threads to find_inferior instead of
2551 &all_lwps.
2552 (arm_remove_point): Ditto.
2553 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2554 (arm_prepare_to_resume): Fetch pid from thread.
2555 (arm_read_description): Fetch lwpid from current_inferior directly.
2556 * linux-low.c (all_lwps): Delete.
2557 (delete_lwp): Delete call to remove_inferior.
2558 (handle_extended_wait): Fetch lwpid from thread.
2559 (add_lwp): Don't set lwp->entry.id. Remove call to
2560 add_inferior_to_list.
2561 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2562 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2563 (kill_one_lwp_callback): Ditto.
2564 (linux_kill): Don't dereference NULL pointer.
2565 Fetch ptid,lwpid from thread.
2566 (get_detach_signal): Fetch ptid from thread.
2567 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2568 Simplify call to regcache_invalidate_thread.
2569 (delete_lwp_callback): Update, "entry" parameter is a
2570 struct thread_info * now. Fetch pid from thread.
2571 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2572 (status_pending_p_callback): Update, "entry" parameter is a
2573 struct thread_info * now. Fetch ptid from thread.
2574 (find_lwp_pid): Update, "entry" parameter is a
2575 struct thread_info * now.
2576 (linux_wait_for_lwp): Fetch pid from thread.
2577 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2578 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2579 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2580 (dequeue_one_deferred_signal): Ditto.
2581 (cancel_breakpoint): Fetch ptid from current_inferior.
2582 (linux_wait_for_event): Pass &all_threads to find_inferior,
2583 not &all_lwps. Fetch ptid, lwpid from thread.
2584 (count_events_callback): Update, "entry" parameter is a
2585 struct thread_info * now.
2586 (select_singlestep_lwp_callback): Ditto.
2587 (select_event_lwp_callback): Ditto.
2588 (cancel_breakpoints_callback): Ditto.
2589 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2590 not &all_lwps.
2591 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2592 (unsuspend_one_lwp): Update, "entry" parameter is a
2593 struct thread_info * now.
2594 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2595 not &all_lwps.
2596 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2597 Fetch lwpid from thread, not lwp.
2598 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2599 Pass &all_threads to find_inferior, not &all_lwps.
2600 (send_sigstop): Fetch lwpid from thread, not lwp.
2601 (send_sigstop_callback): Update, "entry" parameter is a
2602 struct thread_info * now.
2603 (suspend_and_send_sigstop_callback): Ditto.
2604 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2605 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2606 struct thread_info * now.
2607 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2608 from thread, lwp.
2609 (lwp_running): Update, "entry" parameter is a
2610 struct thread_info * now.
2611 (stop_all_lwps): Fetch ptid from thread.
2612 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2613 (linux_resume_one_lwp): Fetch lwpid from thread.
2614 (linux_set_resume_request): Update, "entry" parameter is a
2615 struct thread_info * now. Fetch pid, lwpid from thread.
2616 (resume_status_pending_p): Update, "entry" parameter is a
2617 struct thread_info * now.
2618 (need_step_over_p): Ditto. Fetch lwpid from thread.
2619 (start_step_over): Fetch lwpid from thread.
2620 (linux_resume_one_thread): Update, "entry" parameter is a
2621 struct thread_info * now. Fetch lwpid from thread.
2622 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2623 (proceed_one_lwp): Update, "entry" parameter is a
2624 struct thread_info * now. Fetch lwpid from thread.
2625 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2626 struct thread_info * now.
2627 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2628 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2629 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2630 directly.
2631 (regsets_store_inferior_registers): Ditto.
2632 (fetch_register, store_register): Ditto.
2633 (linux_read_memory, linux_write_memory): Ditto.
2634 (linux_request_interrupt): Ditto.
2635 (linux_read_auxv): Ditto.
2636 (linux_xfer_siginfo): Ditto.
2637 (linux_qxfer_spu): Ditto.
2638 (linux_qxfer_libraries_svr4): Ditto.
2639 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2640 moved to inferiors.h.
2641 (get_lwp): Delete.
2642 (get_thread_lwp): Update.
2643 (struct lwp_info): Delete member "entry". Simplify comment for
2644 member "thread".
2645 (all_lwps): Delete.
2646 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2647 current_inferior directly.
2648 (update_watch_registers_callback): Update, "entry" parameter is a
2649 struct thread_info * now. Fetch pid from thread.
2650 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2651 (mips_insert_point): Fetch lwpid from current_inferior.
2652 Pass &all_threads to find_inferior, not &all_lwps.
2653 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2654 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2655 directly.
2656 (mips_stopped_data_address): Ditto.
2657 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2658 directly.
2659 * linux-tile-low.c (tile_arch_setup): Ditto.
2660 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2661 (update_debug_registers_callback): Update, "entry" parameter is a
2662 struct thread_info * now. Fetch pid from thread.
2663 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2664 Pass &all_threads to find_inferior, not &all_lwps.
2665 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2666 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2667 Pass &all_threads to find_inferior, not &all_lwps.
2668 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2669 (i386_dr_low_get_status): Ditto.
2670 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2671 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2672 (x86_linux_read_description): Ditto.
2673 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2674
3b8361aa
DE
26752014-02-20 Doug Evans <dje@google.com>
2676
2677 * inferiors.c (get_first_inferior): Fix buglet.
2678
f7667f0d
DE
26792014-02-19 Doug Evans <dje@google.com>
2680
2681 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2682 * inferiors.c (add_thread): Change result type to struct thread_info *.
2683 All callers updated.
2684 (add_lwp): Call add_thread here instead of in callers.
2685 All callers updated.
2686 * linux-low.h (get_lwp_thread): Rewrite.
2687 (struct lwp_info): New member "thread".
2688
b3312d80
DE
26892014-02-19 Doug Evans <dje@google.com>
2690
2691 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2692 All callers updated.
2693
ecc6f45c
DE
26942014-02-19 Doug Evans <dje@google.com>
2695
2696 * inferiors.c (add_thread): Fix whitespace.
2697
649ebbca
DE
26982014-02-19 Doug Evans <dje@google.com>
2699
2700 * dll.c (clear_dlls): Replace accessing list implemention details
2701 with API function.
2702 * gdbthread.h (get_first_thread): Declare.
2703 * inferiors.c (for_each_inferior_with_data): New function.
2704 (get_first_thread): New function.
2705 (find_thread_ptid): Simplify.
2706 (get_first_inferior): New function.
2707 (clear_list): Delete.
2708 (one_inferior_p): New function.
2709 (clear_inferior_list): New function.
2710 (clear_inferiors): Update.
2711 * inferiors.h (for_each_inferior_with_data): Declare.
2712 (clear_inferior_list): Declare.
2713 (one_inferior_p): Declare.
2714 (get_first_inferior): Declare.
2715 * linux-low.c (linux_wait_for_event): Replace accessing list
2716 implemention details with API function.
2717 * server.c (target_running): Ditto.
2718 (accumulate_file_name_length): New function.
2719 (emit_dll_description): New function.
2720 (handle_qxfer_libraries): Replace accessing list implemention
2721 details with API function.
2722 (handle_qxfer_threads_worker): New function.
2723 (handle_qxfer_threads_proper): Replace accessing list implemention
2724 details with API function.
2725 (handle_query): Ditto.
2726 (visit_actioned_threads_callback_ftype): New typedef.
2727 (visit_actioned_threads_data): New struct.
2728 (visit_actioned_threads): Rewrite to be find_inferior callback.
2729 (resume): Call find_inferior.
2730 (handle_status): Replace accessing list implemention
2731 details with API function.
2732 (process_serial_event): Replace accessing list implemention details
2733 with API function.
2734 * target.c (set_desired_inferior): Replace accessing list implemention
2735 details with API function.
2736 * tracepoint.c (same_process_p): New function.
2737 (gdb_agent_about_to_close): Replace accessing list implemention
2738 details with API function.
2739 * win32-low.c (child_delete_thread): Replace accessing list
2740 implemention details with API function.
2741 (match_dll_by_basename): New function.
2742 (dll_is_loaded_by_basename): New function.
2743 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2744 details call to dll_is_loaded_by_basename.
2745
80894984
DE
27462014-02-19 Doug Evans <dje@google.com>
2747
2748 * dll.h (struct dll_info): Add comment.
2749 * gdbthread.h (struct thread_info): Add comment.
2750 (current_ptid): Simplify.
2751 * inferiors.c (add_process): Update.
2752 (remove_process): Update.
2753 * inferiors.h (struct process_info): Rename member "head" to "entry".
2754 * linux-low.c (delete_lwp): Update.
2755 (add_lwp): Update.
2756 (last_thread_of_process_p): Update.
2757 (kill_one_lwp_callback, linux_kill): Update.
2758 (status_pending_p_callback): Update.
2759 (wait_for_sigstop): Update. Simplify read of ptid.
2760 (start_step_over): Update.
2761 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2762 (get_lwp_thread): Update.
2763 (struct lwp_info): Rename member "head" to "entry".
2764 * regcache.h (inferior_list_entry): Delete.
2765 * server.c (kill_inferior_callback): Update.
2766 (detach_or_kill_inferior_callback): Update.
2767 (print_started_pid): Update.
2768 (print_attached_pid): Update.
2769 (process_serial_event): Simplify read of ptid.
2770 * thread-db.c (thread_db_create_event): Update.
2771 (thread_db_get_tls_address): Update.
2772 * win32-low.c (current_inferior_ptid): Simplify.
2773
46917d26
TT
27742014-02-19 Tom Tromey <tromey@redhat.com>
2775
2776 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2777 argument.
2778 (target_supports_btrace): Update.
2779
0759a81e
YQ
27802014-02-14 Yao Qi <yao@codesourcery.com>
2781
2782 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2783 (rsp-low-ipa.o): New target.
2784
a7191e8b
TT
27852014-02-12 Tom Tromey <tromey@redhat.com>
2786
2787 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2788 convert_ascii_to_int.
2789 * regcache.c (registers_to_string): Likewise.
2790 * remote-utils.c (decode_M_packet): Likewise.
2791 * server.c (process_serial_event): Likewise.
2792
ff0e980e
TT
27932014-02-12 Tom Tromey <tromey@redhat.com>
2794
2795 * server.c (handle_query, handle_v_run): Use hex2bin, not
2796 unhexify.
2797 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2798
e9371aff
TT
27992014-02-12 Tom Tromey <tromey@redhat.com>
2800
2801 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2802 convert_int_to_ascii.
2803 * regcache.c (registers_to_string, collect_register_as_string):
2804 Likewise.
2805 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2806 Likewise.
2807 * server.c (process_serial_event): Likewise.
2808 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2809 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2810
971dc0b8
TT
28112014-02-12 Tom Tromey <tromey@redhat.com>
2812
2813 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2814 bin2hex, not hexify.
2815 * tracepoint.c (cmd_qtstatus): Likewise.
2816
0a822afb
TT
28172014-02-12 Tom Tromey <tromey@redhat.com>
2818
2819 * remote-utils.c (monitor_output): Pass explicit length to
2820 hexify.
2821
9c3d6531
TT
28222014-02-12 Tom Tromey <tromey@redhat.com>
2823
2824 * tracepoint.c: Include rsp-low.h.
2825 * server.c: Include rsp-low.h.
2826 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2827 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2828 declare.
2829 * remote-utils.c: Include rsp-low.h.
2830 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2831 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2832 (convert_int_to_ascii, convert_ascii_to_int): Move to
2833 common/rsp-low.c.
2834 * regcache.c: Include rsp-low.h.
2835 * ax.c: Include rsp-low.h.
2836 * Makefile.in (SFILES): Add common/rsp-low.c.
2837 (OBS): Add rsp-low.o.
2838 (rsp-low.o): New target.
2839
01fd3ea5
TT
28402014-02-12 Tom Tromey <tromey@redhat.com>
2841
2842 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2843 Include print-utils.h.
2844 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2845 (plongest, thirty_two, phex_nz): Remove.
2846 * Makefile.in (SFILES): Add common/print-utils.c.
2847 (OBS): Add print-utils.o.
2848 (print-utils-ipa.o): New target.
2849 (print-utils.o): New target.
2850 (IPA_OBJS): Add print-utils-ipa.o.
2851
e99dc820
TT
28522014-02-06 Tom Tromey <tromey@redhat.com>
2853
2854 * Makefile.in (SFILES): Fix indentation.
2855
ee1e2d4f
DE
28562014-02-05 Doug Evans <dje@google.com>
2857
2858 * linux-low.c (linux_wait_for_event): Improve comment.
2859 (linux_wait_1): Keep current_inferior in sync with event_child.
2860
f5a02773
DE
28612014-01-22 Doug Evans <dje@google.com>
2862
2863 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2864
87ce2a04
DE
28652014-01-22 Doug Evans <dje@google.com>
2866
2867 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2868 * configure: Regenerate.
2869 * config.in: Regenerate.
2870 * Makefile.in (SFILES): Add debug.c.
2871 (OBS): Add debug.o.
2872 * debug.c: New file.
2873 * debug.h: New file.
2874 * linux-aarch64-low.c (*): Update all debugging printfs to use
2875 debug_printf instead of fprintf.
2876 * linux-arm-low.c (*): Ditto.
2877 * linux-cris-low.c (*): Ditto.
2878 * linux-crisv32-low.c (*): Ditto.
2879 * linux-m32r-low.c (*): Ditto.
2880 * linux-sparc-low.c (*): Ditto.
2881 * linux-x86.c (*): Ditto.
2882 * linux-low.c (*): Ditto.
2883 (linux_wait_1): Add calls to debug_enter, debug_exit.
2884 (linux_wait): Remove redundant debugging printf.
2885 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2886 (linux_resume, unstop_all_lwps): Ditto.
2887 * mem-break.c (*): Update all debugging printfs to use
2888 debug_printf instead of fprintf.
2889 * remote-utils.c (*): Ditto.
2890 * thread-db.c (*): Ditto.
2891 * server.c #include <ctype.h>, "gdb_vecs.h".
2892 (debug_threads): Moved to debug.c.
2893 (*): Update all debugging printfs to use debug_printf instead of
2894 fprintf.
2895 (start_inferior): Replace call to fflush with call to debug_flush.
2896 (monitor_show_help): Mention set debug-format.
2897 (parse_debug_format_options): New function.
2898 (handle_monitor_command): Handle "monitor set debug-format".
2899 (gdbserver_usage): Mention --debug-format.
2900 (main): Parse --debug-format.
2901 * server.h (debug_threads): Declaration moved to debug.h.
2902 #include "debug.h".
2903 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2904 trace_debug_1 that uses debug_printf.
2905 (tracepoint_look_up_symbols): Update all debugging printfs to use
2906 debug_printf instead of fprintf.
2907
e671835b
BS
29082014-01-20 Baruch Siach <baruch@tkos.co.il>
2909
2910 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2911 sys/ptrace.h.
2912
b5737fa9
PA
29132014-01-17 Pedro Alves <palves@redhat.com>
2914
ea38d2a9 2915 PR build/16445
c7faa97a
PA
2916 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2917 defined after including gdb_proc_service.h.
b5737fa9 2918
40ed484e
DE
29192014-01-16 Doug Evans <dje@google.com>
2920
2921 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2922 (match_dll): Use it.
2923
969c39fb
MM
29242014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2925
2926 * target.h (target_ops) <read_btrace>: Change parameters and
2927 return type to allow error reporting.
2928 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2929 trace reading errors on.
2930 * linux-low.c (linux_low_read_btrace): Pass trace reading
2931 errors on.
2932 (linux_low_disable_btrace): New.
2933
ab7f45ba
DE
29342014-01-15 Doug Evans <dje@google.com>
2935
2936 * inferiors.c (thread_id_to_gdb_id): Delete.
2937 * inferiors.h (thread_id_to_gdb_id): Delete.
2938
66af0f44
EZ
29392014-01-13 Eli Zaretskii <eliz@gnu.org>
2940
2941 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2942 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2943 versions.
2944
9939e131
PA
29452014-01-08 Pedro Alves <palves@redhat.com>
2946
2947 * server.c (handle_status): Don't discard previous queued stop
2948 replies or thread's pending status here.
2949 (main) <disconnection>: Do it here instead.
2950
b7ea362b
PA
29512014-01-08 Pedro Alves <palves@redhat.com>
2952
2953 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2954 * server.c (visit_actioned_threads, handle_pending_status): New
2955 function.
2956 (handle_v_cont): Factor out parts to ...
2957 (resume): ... this new function. If in all-stop, and a thread
2958 being resumed has a pending status, report it without actually
2959 resuming.
2960 (myresume): Adjust to use the new 'resume' function.
2961 (clear_pending_status_callback, set_pending_status_callback)
2962 (find_status_pending_thread_callback): New functions.
2963 (handle_status): Handle the case of multiple threads having
2964 interesting statuses to report. Report threads' real last signal
2965 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2966 with an interesting thread to report the status for, instead of
2967 always reporting the status of the first thread.
2968
28498c42
JB
29692014-01-01 Joel Brobecker <brobecker@adacore.com>
2970
2971 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2972 * gdbreplay.c (gdbreplay_version): Likewise.
2973
f45c82da
YZ
29742013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2975
2976 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2977 iov.iov_len with the real length in use.
2978
379a5e2d
JB
29792013-12-13 Joel Brobecker <brobecker@adacore.com>
2980
2981 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2982 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2983 for all targets that use win32-low.c.
2984 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2985 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2986
4210d83e
PA
29872013-12-13 Pedro Alves <palves@redhat.com>
2988
2989 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2990 if equal to TARGET_WAITKIND_LOADED.
2991 * win32-low.c (cached_status): New static global.
2992 (win32_wait): Add declaration.
2993 (do_initial_child_stuff): Flush all initial pending debug events
2994 up to the initial breakpoint.
2995 (win32_wait): If CACHED_STATUS was set, return that instead
2996 of doing a real wait. Remove the code resuming the execution
2997 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2998 during the initial phase. Also remove the code changing
2999 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3000 TARGET_WAITKIND_STOPPED.
3001
e7f0d979
YQ
30022013-12-11 Yao Qi <yao@codesourcery.com>
3003
3004 * notif.c (handle_notif_ack): Return 0 if no notification
3005 matches.
3006
ebcf782c
DE
30072013-11-20 Doug Evans <dje@google.com>
3008
3009 * linux-low.c (linux_set_resume_request): Fix comment.
3010
20ad9378
DE
30112013-11-20 Doug Evans <dje@google.com>
3012
3013 * linux-low.c (resume_status_pending_p): Tweak comment.
3014
a196ebeb
WT
30152013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3016
3017 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3018 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3019 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3020 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3021 (srv_amd64_regobj): Add amd64-mpx.o.
3022 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3023 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3024 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3025 * i387-fp.c (num_pl_bnd_register) Added constant.
3026 (num_pl_bnd_cfg_registers) Added constant.
3027 (struct i387_xsave) Added reserved area and MPX fields.
3028 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3029 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3030 function.
3031 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3032 (init_registers_amd64_mpx_linux): Declare new function.
3033 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3034 (x86_64_regmap): Add MPX registers.
3035 (x86_linux_read_description): Add MPX case.
3036 (initialize_low_arch): Initialize MPX targets.
3037
0080a2f6
TT
30382013-11-18 Tom Tromey <tromey@redhat.com>
3039
3040 * configure: Rebuild.
3041 * configure.ac: Don't check for stdlib.h.
3042 * gdbreplay.c: Unconditionally include stdlib.h.
3043
2978b111
TT
30442013-11-18 Tom Tromey <tromey@redhat.com>
3045
3046 * config.in: Rebuild.
3047 * configure: Rebuild.
3048 * configure.ac: Don't use AC_HEADER_DIRENT.
3049
a3d08894
TT
30502013-11-18 Tom Tromey <tromey@redhat.com>
3051
3052 * server.h: Don't check HAVE_STRING_H.
3053 * gdbreplay.c: Don't check HAVE_STRING_H.
3054 * configure: Rebuild.
3055
0a5dd17d
TT
30562013-11-18 Tom Tromey <tromey@redhat.com>
3057
3058 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3059 LIBGNU.
3060
1bd2f0ba
TT
30612013-11-08 Tom Tromey <tromey@redhat.com>
3062
3063 * configure, config.in: Rebuild.
3064 * configure.ac: Remove unused configury.
3065
3266f10b
TT
30662013-11-08 Tom Tromey <tromey@redhat.com>
3067
3068 * acinclude.m4: Include common.m4, codeset.m4.
3069 * configure, config.in: Rebuild.
3070 * configure.ac: Use GDB_AC_COMMON.
3071
6682d959
AA
30722013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3073
3074 * linux-s390-low.c (HWCAP_S390_TE): New define.
3075 (s390_arch_setup): Consider the TE field in the HWCAP for
3076 determining 'have_regset_tdb'.
3077
fd0a4d76
SDJ
30782013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3079
3080 PR gdb/16014
3081 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3082 call to sizeof.
3083
1a3d890b
PA
30842013-10-02 Pedro Alves <palves@redhat.com>
3085
3086 * server.c (process_serial_event): Don't output "GDBserver
3087 exiting" if GDB is connected through stdio.
3088 * target.c (mywait): Likewise, be silent if GDB is connected
3089 through stdio.
3090
97ad4581
JB
30912013-10-01 Joel Brobecker <brobecker@adacore.com>
3092
3093 * lynx-low.c (lynx_add_threads_after_attach): New function.
3094 (lynx_attach): Remove call to add_thread. Add call to
3095 lynx_add_threads_after_attach instead.
3096
5b4e221c
MF
30972013-09-28 Mike Frysinger <vapier@gentoo.org>
3098
3099 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3100 * config.in, configure: Regenerated.
3101
ee47b2f8
YQ
31022013-09-18 Yao Qi <yao@codesourcery.com>
3103
3104 PR server/15959
3105 * server.c (start_inferior): Clear 'resume_info'.
3106
d6707650 31072013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3108
d6707650
JW
3109 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3110 for each register.
3111
9243dd0e 31122013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3113
9243dd0e
JW
3114 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3115 linux-tile-low.o to srv_tgtobj.
3116
c623a6ef
WN
31172013-09-16 Will Newton <will.newton@linaro.org>
3118
3119 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3120 out regs.
3121
fb71d39e
PA
31222013-09-06 Pedro Alves <palves@redhat.com>
3123
3124 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3125 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3126 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3127 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3128 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3129 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3130
8e7e9910
PA
31312013-09-06 Pedro Alves <palves@redhat.com>
3132
3133 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3134 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3135
7c3a12ca
PA
31362013-09-06 Pedro Alves <palves@redhat.com>
3137
3138 * linux-amd64-ipa.c: Include tracepoint.h.
3139 * linux-i386-ipa.c: Include tracepoint.h.
3140
8eb3d7b6
RW
31412013-09-06 Ricard Wanderlof <ricardw@axis.com>
3142
3143 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3144 (ps_get_thread_area): New function.
3145
eddddb9d
RW
31462013-09-06 Ricard Wanderlof <ricardw@axis.com>
3147
3148 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3149 (initialize_low_arch): Call init_registers_crisv32 rather than
3150 init_register_crisv32.
3151
533b0600
PA
31522013-09-05 Pedro Alves <palves@redhat.com>
3153
3154 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3155 to ...
3156 * hostio.h: ... this new file.
3157 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3158 win32-low.c: Include hostio.h.
3159
0ce3d3b5
PA
31602013-09-05 Pedro Alves <palves@redhat.com>
3161
3162 * server.h (gdb_client_data, handler_func, callback_handler_func)
3163 (delete_file_handler, add_file_handler, append_callback_event)
3164 (delete_callback_event, start_event_loop, initialize_event_loop):
3165 Move to event-loop.h and include it.
3166 * event-loop.h: New file.
3167
799cdc37
PA
31682013-09-05 Pedro Alves <palves@redhat.com>
3169
3170 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3171 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3172 (loaded_dll, unloaded_dll): Move to ...
3173 * dll.h: ... this new file.
3174 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3175
6a6bbd9d
PA
31762013-09-05 Pedro Alves <palves@redhat.com>
3177
3178 * server.h (current_process, get_thread_process, all_processes)
3179 (add_inferior_to_list, for_each_inferior, current_inferior)
3180 (remove_inferior, add_process, remove_process, find_process_pid)
3181 (have_started_inferiors_p, have_attached_inferiors_p)
3182 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3183 (clear_inferiors, find_inferior, find_inferior_id)
3184 (inferior_target_data, set_inferior_target_data)
3185 (inferior_regcache_data, set_inferior_regcache_data): Move to
3186 inferiors.h, and include it.
3187 * inferiors.h: New file.
3188
f699aaba
PA
31892013-09-05 Pedro Alves <palves@redhat.com>
3190
3191 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3192 Move ...
72f4393d 3193 * ax.h: ... here.
f699aaba 3194
c144c7a0
PA
31952013-09-05 Pedro Alves <palves@redhat.com>
3196
3197 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3198 tracepoint.h.
3199 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3200 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3201 (handle_tracepoint_general_set, handle_tracepoint_query)
3202 (tracepoint_finished_step, tracepoint_was_hit)
3203 (release_while_stepping_state_list, current_traceframe)
3204 (in_readonly_region, traceframe_read_mem)
3205 (fetch_traceframe_registers, traceframe_read_sdata)
3206 (traceframe_read_info, struct fast_tpoint_collect_status)
3207 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3208 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3209 (supply_fast_tracepoint_registers)
3210 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3211 (ipa_tdesc, claim_trampoline_space)
3212 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3213 (agent_mem_read, agent_get_trace_state_variable_value)
3214 (agent_set_trace_state_variable_value, agent_tsv_read)
3215 (agent_mem_read_string, get_raw_reg_func_addr)
3216 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3217 * tracepoint.h: ... this new file.
3218
ff42e6ab
PA
32192013-09-05 Pedro Alves <palves@redhat.com>
3220
3221 * server.h (perror_with_name, error, fatal, warning, paddress)
3222 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3223 include it.
3224 * utils.h: New file.
3225
541af0f4
PA
32262013-09-05 Pedro Alves <palves@redhat.com>
3227
3228 * server.h (remote_debug, noack_mode, transport_is_reliable)
3229 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3230 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3231 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3232 (write_enn, initialize_async_io, enable_async_io)
3233 (disable_async_io, check_remote_input_interrupt_request)
3234 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3235 (dead_thread_notify, prepare_resume_reply)
3236 (decode_address_to_semicolon, decode_address, decode_m_packet)
3237 (decode_M_packet, decode_X_packet, decode_xfer_write)
3238 (decode_search_memory_packet, unhexify, hexify)
3239 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3240 (look_up_one_symbol, relocate_instruction)
3241 (monitor_output): Move to remote-utils.h, and include it.
3242 * remote-utils.h: New file.
3243
eebdf26b
PA
32442013-09-05 Pedro Alves <palves@redhat.com>
3245
3246 * server.h (_): Delete.
3247
3aafd2ff
PA
32482013-09-02 Pedro Alves <palves@redhat.com>
3249
3250 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3251 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3252 allocated.
3253 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3254
cee83bcb
PM
32552013-09-02 Pierre Muller <muller@sourceware.org>
3256
3257 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3258 or WriteProcessMemory complete successfully and handle
3259 ERROR_PARTIAL_COPY error.
3260
9a13b2fa
PA
32612013-09-02 Pedro Alves <palves@redhat.com>
3262
3263 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3264 error instead of EIO.
3265
602e3198
JK
32662013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3267
3268 PR server/15604
3269 * linux-low.c: Include filestuff.h.
3270 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3271 * lynx-low.c: Include filestuff.h.
3272 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3273 * server.c: Include filestuff.h.
3274 (main): Call notice_open_fds.
3275 * spu-low.c: Include filestuff.h.
3276 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3277
96d7229d
LM
32782013-08-22 Luis Machado <lgustavo@codesourcery.com>
3279
3280 * Makefile.in: Explain why ../target and ../nat are not
3281 listed as include file search paths.
3282 (linux-waitpid.o): New object file rule.
3283 * configure.srv (srv_native_linux_obj): New variable.
3284 Replace all occurrences of linux native object files with
3285 $srv_native_linux_obj.
3286 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3287 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3288 (linux_enable_event_reporting): Remove declaration.
3289 (my_waitpid): Moved to common/linux-waitpid.c.
3290 (linux_wait_for_event): Pass ptid when calling
3291 linux_enable_event_reporting.
3292 (linux_supports_tracefork_flag): Remove.
3293 (linux_enable_event_reporting): Likewise.
3294 (linux_tracefork_grandchild): Remove.
3295 (STACK_SIZE): Moved to common/linux-ptrace.c.
3296 (linux_tracefork_child): Remove.
3297 (linux_test_for_tracefork): Remove.
3298 (linux_look_up_symbols): Call linux_supports_traceclone.
3299 (initialize_low): Remove call to linux_test_for_tracefork.
3300 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3301 common/linux-ptrace.h.
3302 (PTRACE_TYPE_ARG4): Likewise.
3303 Include linux-ptrace.h.
3304
32940073
PA
33052013-08-21 Pedro Alves <palves@redhat.com>
3306
3307 * config.in: Renegerate.
3308
33b60d58 33092013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3310
33b60d58
LM
3311 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3312 (SFILES): Remove $(srcdir)/common/target-common.c and
3313 add $(srcdir)/target/waitstatus.c.
3314 (OBS): Remove target-common.o and add waitstatus.o.
3315 (server_h): Remove $(srcdir)/../common/target-common.h and
3316 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3317 and $(srcdir)/../target/waitstatus.h.
3318 (target-common.o): Remove.
3319 (waitstatus.o): New target object file.
3320 * target.h: Do not include target-common.h and
3321 include target/resume.h, target/wait.h and
3322 target/waitstatus.h.
3323
b8e1b30e
LM
33242013-08-13 Luis Machado <lgustavo@codesourcery.com>
3325
3326 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3327 to PTRACE_TYPE_ARG3.
3328 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3329 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3330 PTRACE_TYPE_ARG4.
3331 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3332 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3333
7a60ad40
YQ
33342013-07-27 Jie Zhang <jie@codesourcery.com>
3335 Daniel Jacobowitz <dan@codesourcery.com>
3336 Yao Qi <yao@codesourcery.com>
3337
3338 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3339 (mips-linux-watch.o): New rule.
3340 (mips_linux_watch_h): New variable.
3341 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3342 srv_tgtobj.
3343 * linux-mips-low.c: Include mips-linux-watch.h.
3344 (struct arch_process_info, struct arch_lwp_info): New.
3345 (update_watch_registers_callback): New function.
3346 (mips_linux_new_process, mips_linux_new_thread) New functions.
3347 (mips_linux_prepare_to_resume, mips_insert_point): New
3348 functions.
3349 (mips_remove_point, mips_stopped_by_watchpoint): New
3350 functions.
3351 (rsp_bp_type_to_target_hw_bp_type): New function.
3352 (mips_stopped_data_address): New function.
3353 (the_low_target): Add watchpoint support functions.
3354
de6f69ad
YQ
33552013-07-27 Yao Qi <yao@codesourcery.com>
3356
3357 * i386-low.c: Include break-common.h.
3358 (enum target_hw_bp_type): Remove.
3359
3360c0bf
LM
33602013-07-24 Luis Machado <lgustavo@codesourcery.com>
3361
3362 * Makefile.in (SFILES): /common/target-common.c.
3363 (OBS): Add target-common.o.
3364 (server_h): Add $(srcdir)/../common/target-common.h.
3365 (target-common.o): New target.
3366 * server.c (queue_stop_reply_callback): Free
3367 status string after use.
3368 * target.c (target_waitstatus_to_string): Remove.
3369 * target.h: Include target-common.h.
3370 (resume_kind): Likewise.
3371 (target_waitkind): Likewise.
3372 (target_waitstatus): Likewise.
3373 (TARGET_WNOHANG): Likewise.
3374
bd885420
YQ
33752013-07-04 Yao Qi <yao@codesourcery.com>
3376
3377 * Makefile.in (host_alias): Use @host_noncanonical@.
3378 (target_alias): Use @target_noncanonical@.
3379 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3380 ACX_NONCANONICAL_HOST.
3381 * configure: Regenerated.
3382
3383 Revert:
3384 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3385
3386 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3387 * configure: Rebuild.
3388 * Makefile.in (version_host, version_target): Get from configure.
3389 (version.c): Use $(version_host) and $(version_target).
3390
17ef446e
PA
33912013-07-03 Pedro Alves <palves@redhat.com>
3392
3393 * Makefile.in (config.status): Depend on development.sh.
3394 * acinclude.m4: Include libmcheck.m4.
3395 * configure: Regenerate.
3396
7a9a7487
MG
33972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3398
3399 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3400 attribute inside the parentheses.
3401 (winapi_DebugSetProcessKillOnExit): Ditto.
3402 (winapi_DebugBreakProcess): Ditto.
3403 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3404
49b64de6
MG
34052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3406
3407 * notif.h (notif_event): Add a dummy member to avoid compiler
3408 errors.
3409
d5749ee7
PA
34102013-07-01 Pedro Alves <palves@redhat.com>
3411
3412 * hostio.c (HOSTIO_PATH_MAX): Define.
3413 (require_filename, handle_open, handle_unlink, handle_readlink):
3414 Use it.
3415
d8d2a3ee
PA
34162013-07-01 Pedro Alves <palves@redhat.com>
3417
3418 * server.h: Include "pathmax.h".
3419 * linux-low.c: Don't include sys/param.h.
3420 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3421 MAXPATHLEN.
3422 * win32-low.c: Don't include sys/param.h.
3423 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3424
bc7dea8d
PA
34252013-07-01 Pedro Alves <palves@redhat.com>
3426
3427 * event-loop.c: Don't check HAVE_UNISTD_H before including
3428 <unistd.h>.
3429 * gdbreplay.c: Likewise.
3430 * remote-utils.c: Likewise.
3431 * server.c: Likewise.
3432 * configure.ac: Don't check for unistd.h.
3433 * configure: Regenerate.
3434
d6c2da54
TT
34352013-06-28 Tom Tromey <tromey@redhat.com>
3436
3437 * Makefile.in (version.c): Use version.in, not
3438 common/version.in.
3439
257b6bec
MG
34402013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3441
3442 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3443 * configure: Rebuild.
3444 * Makefile.in (version_host, version_target): Get from configure.
3445 (version.c): Use $(version_host) and $(version_target).
3446
86ebe149
DK
34472013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3448
3449 Fix trace-status to output user name without trailing colon.
3450 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3451
f30aa5af
DK
34522013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3453
3454 Fix trace-status to output proper start-time and stop-time.
3455 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3456 output start time and stop time in hex as gdb expects.
3457
28a93511
YQ
34582013-06-26 Pedro Alves <pedro@codesourcery.com>
3459
3460 * tracepoint.c (build_traceframe_info_xml): Output trace state
3461 variables present in the trace buffer.
3462
01208463
TT
34632013-06-24 Tom Tromey <tromey@redhat.com>
3464
3465 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3466 create-version.sh.
3467 (version.o): Remove.
3468 * gdbreplay.c: Include version.h.
3469 (version, host_name): Don't declare.
3470 * server.h: Include version.h.
3471 (version, host_name): Don't declare.
3472
760256f9
PA
34732013-06-12 Pedro Alves <palves@redhat.com>
3474
3475 * linux-x86-low.c (linux_is_elf64): Delete global.
3476 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3477 with local linux_pid_exe_is_elf_64_file use.
3478
030031ee
PA
34792013-06-11 Pedro Alves <palves@redhat.com>
3480
3481 * linux-low.c (regset_disabled, disable_regset): New functions.
3482 (regsets_fetch_inferior_registers)
3483 (regsets_store_inferior_registers): Use them.
3484 (initialize_regsets_info); Don't allocate the disabled_regsets
3485 array here.
3486 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3487 comment.
3488
5da6eb0a
PA
34892013-06-11 Pedro Alves <palves@redhat.com>
3490
3491 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3492 xmalloc.
3493
7e5aaa09
PA
34942013-06-11 Pedro Alves <palves@redhat.com>
3495
3496 * linux-x86-low.c (initialize_low_arch): Call
3497 init_registers_x32_avx_linux.
3498
d878444c
JK
34992013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3500
3501 Fix compatibility with Android Bionic.
3502 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3503 it is not empty.
3504
3aee8918
PA
35052013-06-07 Pedro Alves <palves@redhat.com>
3506
5f2b57b5 3507 PR server/14823
3aee8918
PA
3508 * Makefile.in (OBS): Add tdesc.o.
3509 (IPA_OBJS): Add tdesc-ipa.o.
3510 (tdesc-ipa.o): New rule.
3511 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3512 interface.
3513 * linux-low.c (new_inferior): Delete.
3514 (disabled_regsets, num_regsets): Delete.
3515 (linux_add_process): Adjust to set the new per-process
3516 new_inferior flag.
3517 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3518 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3519 was a stop. When calling arch_setup, switch the current inferior
3520 to the thread that got an event.
3521 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3522 (regsets_fetch_inferior_registers)
3523 (regsets_store_inferior_registers): New regsets_info parameter.
3524 Adjust to use it.
3525 (linux_register_in_regsets): New regs_info parameter. Adjust to
3526 use it.
3527 (register_addr, fetch_register, store_register): New usrregs_info
3528 parameter. Adjust to use it.
3529 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3530 parameter regs_info. Adjust to use it.
3531 (linux_fetch_registers): Get the current inferior's regs_info, and
3532 adjust to use it.
3533 (linux_store_registers): Ditto.
3534 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3535 (initialize_low): Don't initialize the target_regsets here. Call
3536 initialize_low_arch.
3537 * linux-low.h (target_regsets): Delete declaration.
3538 (struct regsets_info): New.
3539 (struct usrregs_info): New.
3540 (struct regs_info): New.
3541 (struct process_info_private) <new_inferior>: New field.
3542 (struct linux_target_ops): Delete the num_regs, regmap, and
3543 regset_bitmap fields. New field regs_info.
3544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3545 * i387-fp.c (num_xmm_registers): Delete.
3546 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3547 calls to new interface.
3548 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3549 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3550 Infer the number of xmm registers from the regcache's target
3551 description.
3552 * i387-fp.h (num_xmm_registers): Delete.
3553 * inferiors.c (add_thread): Don't install the thread's regcache
3554 here.
3555 * proc-service.c (gregset_info): Fetch the current inferior's
3556 regs_info. Adjust to use it.
3557 * regcache.c: Include tdesc.h.
3558 (register_bytes, reg_defs, num_registers)
3559 (gdbserver_expedite_regs): Delete.
3560 (get_thread_regcache): If the thread doesn't have a regcache yet,
3561 create one, instead of aborting gdbserver.
3562 (regcache_invalidate_one): Rename to ...
3563 (regcache_invalidate_thread): ... this.
3564 (regcache_invalidate_one): New.
3565 (regcache_invalidate): Only invalidate registers of the current
3566 process.
3567 (init_register_cache): Add target_desc parameter, and use it.
3568 (new_register_cache): Ditto. Assert the target description has a
3569 non zero registers_size.
3570 (regcache_cpy): Add assertions. Adjust.
3571 (realloc_register_cache, set_register_cache): Delete.
3572 (registers_to_string, registers_from_string): Adjust.
3573 (find_register_by_name, find_regno, find_register_by_number)
3574 (register_cache_size): Add target_desc parameter, and use it.
3575 (free_register_cache_thread, free_register_cache_thread_one)
3576 (regcache_release, register_cache_size): New.
3577 (register_size): Add target_desc parameter, and use it.
3578 (register_data, supply_register, supply_register_zeroed)
3579 (supply_regblock, supply_register_by_name, collect_register)
3580 (collect_register_as_string, collect_register_by_name): Adjust.
3581 * regcache.h (struct target_desc): Forward declare.
3582 (struct regcache) <tdesc>: New field.
3583 (init_register_cache, new_register_cache): Add target_desc
3584 parameter.
3585 (regcache_invalidate_thread): Declare.
3586 (regcache_invalidate_one): Delete declaration.
3587 (regcache_release): Declare.
3588 (find_register_by_number, register_cache_size, register_size)
3589 (find_regno): Add target_desc parameter.
3590 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3591 declarations.
3592 * remote-utils.c: Include tdesc.h.
3593 (outreg, prepare_resume_reply): Adjust.
3594 * server.c: Include tdesc.h.
3595 (gdbserver_xmltarget): Delete declaration.
3596 (get_features_xml, process_serial_event): Adjust.
3597 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3598 declare.
3599 (struct process_info) <tdesc>: New field.
3600 (ipa_tdesc): Declare.
3601 * tdesc.c: New file.
3602 * tdesc.h: New file.
3603 * tracepoint.c: Include tdesc.h.
3604 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3605 (get_context_regcache): Adjust to pass ipa_tdesc down.
3606 (do_action_at_tracepoint): Adjust to get the register cache size
3607 from the context regcache's description.
3608 (traceframe_walk_blocks): Adjust to get the register cache size
3609 from the current trace frame's description.
3610 (traceframe_get_pc): Adjust to get current trace frame's
3611 description and pass it down.
3612 (gdb_collect): Adjust to get the register cache size from the
3613 IPA's description.
3614 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3615 (gdbserver_xmltarget): Delete.
3616 (initialize_low_tracepoint): Set the ipa's target description.
3617 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3618 (initialize_low_tracepoint): Set the ipa's target description.
3619 * linux-x86-low.c: Include tdesc.h.
3620 [__x86_64__] (is_64bit_tdesc): New.
3621 (ps_get_thread_area, x86_get_thread_area): Use it.
3622 (i386_cannot_store_register): Rename to ...
3623 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3624 (i386_cannot_fetch_register): Rename to ...
3625 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3626 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3627 to new interface.
3628 (target_regsets): Rename to ...
3629 (x86_regsets): ... this.
3630 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3631 interface.
3632 (x86_siginfo_fixup): Use is_64bit_tdesc.
3633 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3634 (tdesc_x32_avx_linux, tdesc_x32_linux)
3635 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3636 Declare.
3637 (x86_linux_update_xmltarget): Delete.
3638 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3639 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3640 (AMD64_LINUX_USER64_CS): New.
3641 (x86_linux_read_description): New, based on
3642 x86_linux_update_xmltarget.
3643 (same_process_callback): New.
3644 (x86_arch_setup_process_callback): New.
3645 (x86_linux_update_xmltarget): New.
3646 (x86_regsets_info): New.
3647 (amd64_linux_regs_info): New.
3648 (i386_linux_usrregs_info): New.
3649 (i386_linux_regs_info): New.
3650 (x86_linux_regs_info): New.
3651 (x86_arch_setup): Reimplement.
3652 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3653 (x86_emit_ops): Ditto.
3654 (the_low_target): Adjust. Install x86_linux_regs_info,
3655 x86_cannot_fetch_register, and x86_cannot_store_register.
3656 (initialize_low_arch): New.
3657 * linux-ia64-low.c (tdesc_ia64): Declare.
3658 (ia64_fetch_register): Adjust.
3659 (ia64_usrregs_info, regs_info): New globals.
3660 (ia64_regs_info): New function.
3661 (the_low_target): Adjust.
3662 (initialize_low_arch): New function.
3663 * linux-sparc-low.c (tdesc_sparc64): Declare.
3664 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3665 Adjust.
3666 (sparc_arch_setup): New function.
3667 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3668 (the_low_target): Adjust.
3669 (initialize_low_arch): New function.
3670 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3671 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3672 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3673 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3674 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3675 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3676 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3677 (tdesc_powerpc_isa205_vsx64l): Declare.
3678 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3679 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3680 (ppc_set_pc, ppc_get_hwcap): Adjust.
3681 (ppc_usrregs_info): Forward declare.
3682 (!__powerpc64__) ppc_regmap_adjusted: New global.
3683 (ppc_arch_setup): Adjust to the current process'es target
3684 description.
3685 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3686 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3687 (ppc_store_evrregset): Adjust.
3688 (target_regsets): Rename to ...
3689 (ppc_regsets): ... this, and make static.
3690 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3691 (ppc_regs_info): New function.
3692 (the_low_target): Adjust.
3693 (initialize_low_arch): New function.
3694 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3695 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3696 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3697 (tdesc_s390x_linux64v2): Declare.
3698 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3699 (s390_fill_gregset, s390_store_last_break): Adjust.
3700 (target_regsets): Rename to ...
3701 (s390_regsets): ... this, and make static.
3702 (s390_get_pc, s390_set_pc): Adjust.
3703 (s390_get_hwcap): New target_desc parameter, and use it.
3704 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3705 (s390_arch_setup): Adjust to set the current process'es target
3706 description. Don't adjust the regmap.
3707 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3708 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3709 (regs_info_3264): New globals.
3710 (s390_regs_info): New function.
3711 (the_low_target): Adjust.
3712 (initialize_low_arch): New function.
3713 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3714 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3715 [__mips64] (init_registers_mips_linux)
3716 (init_registers_mips_dsp_linux): Delete defines.
3717 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3718 (have_dsp): New global.
3719 (mips_read_description): New, based on mips_arch_setup.
3720 (mips_arch_setup): Reimplement.
3721 (get_usrregs_info): New function.
3722 (mips_cannot_fetch_register, mips_cannot_store_register)
3723 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3724 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3725 (target_regsets): Rename to ...
3726 (mips_regsets): ... this, and make static.
3727 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3728 (dsp_regs_info, regs_info): New globals.
3729 (mips_regs_info): New function.
3730 (the_low_target): Adjust.
3731 (initialize_low_arch): New function.
3732 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3733 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3734 Declare.
3735 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3736 (arm_read_description): New, with bits factored from
3737 arm_arch_setup.
3738 (arm_arch_setup): Reimplement.
3739 (target_regsets): Rename to ...
3740 (arm_regsets): ... this, and make static.
3741 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3742 (arm_regs_info): New function.
3743 (the_low_target): Adjust.
3744 (initialize_low_arch): New function.
3745 * linux-m68k-low.c (tdesc_m68k): Declare.
3746 (target_regsets): Rename to ...
3747 (m68k_regsets): ... this, and make static.
3748 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3749 (m68k_regs_info): New function.
3750 (m68k_arch_setup): New function.
3751 (the_low_target): Adjust.
3752 (initialize_low_arch): New function.
3753 * linux-sh-low.c (tdesc_sharch): Declare.
3754 (target_regsets): Rename to ...
3755 (sh_regsets): ... this, and make static.
3756 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3757 (sh_regs_info, sh_arch_setup): New functions.
3758 (the_low_target): Adjust.
3759 (initialize_low_arch): New function.
3760 * linux-bfin-low.c (tdesc_bfin): Declare.
3761 (bfin_arch_setup): New function.
3762 (bfin_usrregs_info, regs_info): New globals.
3763 (bfin_regs_info): New function.
3764 (the_low_target): Adjust.
3765 (initialize_low_arch): New function.
3766 * linux-cris-low.c (tdesc_cris): Declare.
3767 (cris_arch_setup): New function.
3768 (cris_usrregs_info, regs_info): New globals.
3769 (cris_regs_info): New function.
3770 (the_low_target): Adjust.
3771 (initialize_low_arch): New function.
3772 * linux-cris-low.c (tdesc_crisv32): Declare.
3773 (cris_arch_setup): New function.
3774 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3775 (cris_regs_info): New function.
3776 (the_low_target): Adjust.
3777 (initialize_low_arch): New function.
3778 * linux-m32r-low.c (tdesc_m32r): Declare.
3779 (m32r_arch_setup): New function.
3780 (m32r_usrregs_info, regs_info): New globals.
3781 (m32r_regs_info): Adjust.
3782 (initialize_low_arch): New function.
3783 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3784 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3785 (tic6x_usrregs_info): Forward declare.
3786 (tic6x_read_description): New function, based on ...
3787 (tic6x_arch_setup): ... this. Reimplement.
3788 (target_regsets): Rename to ...
3789 (tic6x_regsets): ... this, and make static.
3790 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3791 (tic6x_regs_info): New function.
3792 (the_low_target): Adjust.
3793 (initialize_low_arch): New function.
3794 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3795 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3796 (target_regsets): Rename to ...
3797 (xtensa_regsets): ... this, and make static.
3798 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3799 globals.
3800 (xtensa_arch_setup, xtensa_regs_info): New functions.
3801 (the_low_target): Adjust.
3802 (initialize_low_arch): New function.
3803 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3804 (nios2_arch_setup): Set the current process'es tdesc.
3805 (target_regsets): Rename to ...
3806 (nios2_regsets): ... this.
3807 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3808 (nios2_regs_info): New function.
3809 (the_low_target): Adjust.
3810 (initialize_low_arch): New function.
a261b8f5
PA
3811 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3812 (aarch64_arch_setup): Set the current process'es tdesc.
3813 (target_regsets): Rename to ...
3814 (aarch64_regsets): ... this.
3815 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3816 (aarch64_regs_info): New function.
3817 (the_low_target): Adjust.
3818 (initialize_low_arch): New function.
3aee8918
PA
3819 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3820 globals.
3821 (target_regsets): Rename to ...
3822 (tile_regsets): ... this.
3823 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3824 (tile_regs_info): New function.
3825 (tile_arch_setup): Set the current process'es tdesc.
3826 (the_low_target): Adjust.
3827 (initialize_low_arch): New function.
3828 * spu-low.c (tdesc_spu): Declare.
3829 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3830 * win32-arm-low.c (tdesc_arm): Declare.
3831 (arm_arch_setup): New function.
3832 (the_low_target): Install arm_arch_setup instead of
3833 init_registers_arm.
3834 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3835 (init_windows_x86): Rename to ...
3836 (i386_arch_setup): ... this. Set `win32_tdesc'.
3837 (the_low_target): Adjust.
3838 * win32-low.c (win32_tdesc): New global.
3839 (child_add_thread): Don't create the thread cache here.
3840 (do_initial_child_stuff): Set the new process'es tdesc.
3841 * win32-low.h (struct target_desc): Forward declare.
3842 (win32_tdesc): Declare.
3843 * lynx-i386-low.c (tdesc_i386): Declare global.
3844 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3845 * lynx-low.c (lynx_tdesc): New global.
3846 (lynx_add_process): Set the new process'es tdesc.
3847 * lynx-low.h (struct target_desc): Forward declare.
3848 (lynx_tdesc): Declare global.
3849 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3850 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3851 * nto-low.c (nto_tdesc): New global.
3852 (do_attach): Set the new process'es tdesc.
3853 * nto-low.h (struct target_desc): Forward declare.
3854 (nto_tdesc): Declare.
3855 * nto-x86-low.c (tdesc_i386): Declare.
3856 (nto_x86_arch_setup): Set `nto_tdesc'.
3857
b1fbec62
GB
38582013-06-04 Gary Benson <gbenson@redhat.com>
3859
3860 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3861 to qSupported response when appropriate.
3862 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3863 with nonzero-length annex.
3864 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3865 arguments supplied in annex.
3866
d1ec4ce7
DE
38672013-05-31 Doug Evans <dje@google.com>
3868
ac44adcb 3869 PR server/15594
d1ec4ce7
DE
3870 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3871 64 bits in 64-cross-32 environment.
3872
9b25f2d3
PA
38732013-05-28 Pedro Alves <palves@redhat.com>
3874
3875 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3876 (aarch64-without-fpu.c): Delete rule.
3877 * configure.srv (aarch64*-*-linux*): Remove references to
3878 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3879 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3880 declaration.
3881
6740dc9c
PA
38822013-05-24 Pedro Alves <palves@redhat.com>
3883
3884 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3885 instead of strchr/decode_address. Error if the range isn't split
3886 with a ','. Don't assume there's be a ':' in the action.
3887
c2d6af84
PA
38882013-05-23 Yao Qi <yao@codesourcery.com>
3889 Pedro Alves <palves@redhat.com>
3890
3891 * linux-low.c (lwp_in_step_range): New function.
3892 (linux_wait_1): If the thread was range stepping and stopped
3893 outside the stepping range, report the stop to GDB. Otherwise,
3894 continue stepping. Add range stepping debug output.
3895 (linux_set_resume_request): Copy the step range from the resume
3896 request to the lwp.
3897 (linux_supports_range_stepping): New.
3898 (linux_target_ops) <supports_range_stepping>: Set to
3899 linux_supports_range_stepping.
3900 * linux-low.h (struct linux_target_ops)
3901 <supports_range_stepping>: New field.
3902 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3903 * linux-x86-low.c (x86_supports_range_stepping): New.
3904 (the_low_target) <supports_range_stepping>: Set to
3905 x86_supports_range_stepping.
3906 * server.c (handle_v_cont): Handle 'r' action.
3907 (handle_v_requests): Append ";r" if the target supports range
3908 stepping.
3909 * target.h (struct thread_resume) <step_range_start,
3910 step_range_end>: New fields.
3911 (struct target_ops) <supports_range_stepping>:
3912 New field.
3913 (target_supports_range_stepping): New macro.
3914
58794e1a
JB
39152013-05-17 Joel Brobecker <brobecker@adacore.com>
3916
3917 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3918 confusion in comment.
3919
d631c5a7
JB
39202013-05-17 Joel Brobecker <brobecker@adacore.com>
3921
3922 * lynx-low.c (struct process_info_private): New type.
3923 (lynx_add_process): New function.
3924 (lynx_create_inferior, lynx_attach): Replace calls to
3925 add_process by calls to lynx_add_process.
3926 (lynx_resume): If PTID is null, then try using
3927 current_process()->private->last_wait_event_ptid.
3928 Add comments.
3929 (lynx_clear_inferiors): Delete. The contents of that function
3930 has been inlined in lynx_mourn;
3931 (lynx_wait_1): Save the ptid in the process's private data.
3932 (lynx_mourn): Free the process' private data. Replace call
3933 to lynx_clear_inferiors by call to clear_inferiors.
3934
96f7a20f
YQ
39352013-05-17 Yao Qi <yao@codesourcery.com>
3936
3937 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3938 the right place.
3939
db0dfaa0
LM
39402013-05-16 Luis Machado <lgustavo@codesourcery.com>
3941
3942 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3943 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3944 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3945 PT_TEXT_END_ADDR guards. Update comments.
3946 (linux_target_op) <read_offsets>: Conditionally define to
3947 linux_read_offsets if the target is UCLIBC and if it defines
3948 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3949
68f5f838
SL
39502013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3951 Andrew Jenner <andrew@codesourcery.com>
3952
3953 * Makefile.in (SFILES): Add linux-nios2-low.c.
3954 (clean): Add action to delete nios2-linux.c.
3955 (nios2-linux.c): New rule.
3956 * configure.srv: Add nios2*-*-linux*.
3957 * linux-nios2-low.c: New.
3958
1ebff1fd
HAQ
39592013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3960
3961 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3962
f6150862
HZ
39632013-04-25 Hui Zhu <hui@codesourcery.com>
3964
3965 PR gdb/15186
f6150862
HZ
3966 * ax.c (ax_printf): Add fflush.
3967
614c279d
TT
39682013-04-22 Tom Tromey <tromey@redhat.com>
3969
3970 * Makefile.in (SFILES): Add filestuff.c.
3971 (OBS): Add filestuff.o.
3972 (filestuff.o): New target.
3973 * config.in, configure: Rebuild.
3974 * configure.ac: Check for fdwalk, pipe2.
3975
7d4e5717
PA
39762013-04-17 Pedro Alves <palves@redhat.com>
3977
3978 * configure.ac (USE_THREAD_DB): Delete variable.
3979 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3980 Don't AC_SUBST USE_THREAD_DB.
3981 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3982 * config.in, configure: Regenerate.
3983
d5c93e41
PA
39842013-04-16 Pedro Alves <palves@redhat.com>
3985
3986 * linux-low.h (struct lwp_info) <thread_known>: Move under
3987 the USE_THREAD_DB #ifdef.
3988
04f5fe89
PA
39892013-04-16 Pedro Alves <palves@redhat.com>
3990
3991 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3992 (linux-low.o): Delete rule.
3993 * linux-low.h: Always include "gdb_thread_db.h" instead of
3994 conditionally including thread_db.h.
3995 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3996 HAVE_THREAD_DB_H.
3997
480b27bf
JK
39982013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3999
4000 * Makefile.in (install-only): Fix make install regression.
4001
43662968
JK
40022013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4003
4004 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4005 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4006 installation.
4007 * gdbserver.1: Remove.
4008
3e74e146
PA
40092013-03-22 Pedro Alves <palves@redhat.com>
4010
4011 * linux-low.c (handle_extended_wait): Don't call
4012 linux_enable_event_reporting.
4013
a8347a2a
TT
40142013-03-15 Tony Theodore <tonyt@logyst.com>
4015
4016 PR build/9098:
4017 * Makefile.in (SHELL): Use @SHELL@.
4018
eeb56fa7
SDJ
40192013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4020
4021 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4022 compiler warning.
4023
4fa7e2ff
JB
40242013-03-13 Joel Brobecker <brobecker@adacore.com>
4025
4026 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4027 Remove extraneous NULL element.
4028
8ddb1965
YQ
40292013-03-13 Yao Qi <yao@codesourcery.com>
4030
4031 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4032 'V' block in trace frame.
4033
9accd112
MM
40342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4035
4036 * target.h (struct target_ops): Add btrace ops.
4037 (target_supports_btrace): New macro.
4038 (target_enable_btrace): New macro.
4039 (target_disable_btrace): New macro.
4040 (target_read_btrace): New macro.
4041 * gdbthread.h (struct thread_info): Add btrace field.
4042 * server.c: Include btrace-common.h.
4043 (handle_btrace_general_set): New function.
4044 (handle_btrace_enable): New function.
4045 (handle_btrace_disable): New function.
4046 (handle_general_set): Call handle_btrace_general_set.
4047 (handle_qxfer_btrace): New function.
4048 (struct qxfer qxfer_packets[]): Add btrace entry.
4049 * inferiors.c (remove_thread): Disable btrace.
4050 * linux-low: Include linux-btrace.h.
4051 (linux_low_enable_btrace): New function.
4052 (linux_low_read_btrace): New function.
4053 (linux_target_ops): Add btrace ops.
4054 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4055 Add srv_linux_btrace=yes.
4056 (x86_64-*-linux*): Add linux-btrace.o.
4057 Add srv_linux_btrace=yes.
4058 * configure.ac: Define HAVE_LINUX_BTRACE.
4059 * config.in: Regenerated.
4060 * configure: Regenerated.
4061
5cc22e4c
MM
40622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4063
4064 * server.c (handle_qxfer): Preserve error message if -3 is
4065 returned.
4066 (qxfer): Document the -3 return value.
4067
7c97f91e
MM
40682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4069
4070 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4071 (linux_btrace_h): New variable.
4072 (linux-btrace.o): New rule.
4073
be9a119c 40742013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4075 Hafiz Abid Qadeer <abidh@codesourcery.com>
4076
4077 * tracepoint.c (trace_buffer_size): New global.
4078 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4079 (init_trace_buffer): Change to one-argument function. Allocate
4080 trace buffer memory.
4081 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4082 handle QTBuffer:size packet.
4083 (cmd_bigqtbuffer_size): New function.
4084 (initialize_tracepoint): Call init_trace_buffer with
4085 DEFAULT_TRACE_BUFFER_SIZE.
4086 * server.c (handle_query): Add QTBuffer:size in the
4087 supported packets.
4088
e64f7499
YQ
40892013-03-07 Yao Qi <yao@codesourcery.com>
4090
4091 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4092 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4093 of -1.
4094 (cmd_qtsp): Adjust condition. Do post increment.
4095 Set cur_action and cur_step_action back to 0.
4096
f0ae6fc3
PA
40972013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4098
4099 PR server/15236
4100 * linux-low.c (linux_write_memory): Return early success if LEN is
4101 zero.
4102
b5b0b0af
CV
41032013-03-05 Corinna Vinschen <vinschen@redhat.de>
4104
334ad4a8 4105 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4106
589bc927
TT
41072013-02-28 Tom Tromey <tromey@redhat.com>
4108
4109 * configure.ac: Invoke AC_SYS_LARGEFILE.
4110 * configure, config.in: Rebuild.
4111
dfe07582
CV
41122013-02-28 Corinna Vinschen <vinschen@redhat.com>
4113
4114 * win32-low.c: Throughout, fix format strings and casts of
4115 printf-like functions to avoid type related warnings on all
4116 platforms.
4117 (get_child_debug_event): Print dwDebugEventCode as hex since
4118 that's how it's usually documented.
4119
736cd585
YQ
41202013-02-28 Yao Qi <yao@codesourcery.com>
4121
4122 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4123 pulongest.
4124
e1f58301
JW
41252013-02-27 Jiong Wang <jiwang@tilera.com>
4126
4127 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4128 (reg-tilegx32.c): New rule.
4129 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4130 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4131 different register info initializer according to elf class.
4132 (init_registers_tilgx32): New function. The tilegx32 register info
4133 initializer.
4134 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4135 (tile_store_gregset): Likewise.
4136
d171ca78
YQ
41372013-02-27 Yao Qi <yao@codesourcery.com>
4138
4139 * server.c (process_point_options): Print debug message when
4140 debug_threads is true.
4141
282bbdf3
YQ
41422013-02-26 Yao Qi <yao@codesourcery.com>
4143
4144 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4145
aca22551
PA
41462013-02-19 Pedro Alves <palves@redhat.com>
4147 Kai Tietz <ktietz@redhat.com>
4148
4149 PR gdb/15161
4150
4151 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4152 instead of strtoul to extract address from packet.
4153 (process_serial_event) <'z'>: Likewise.
4154
4f3cee1c
YQ
41552013-02-18 Yao Qi <yao@codesourcery.com>
4156
4157 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4158
8e1d55a3
PA
41592013-02-14 Pedro Alves <palves@redhat.com>
4160
4161 Plug memory leak.
4162
4163 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4164 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4165
458820da
PA
41662013-02-14 Pedro Alves <palves@redhat.com>
4167
4168 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4169
baea0dae
PA
41702013-02-14 Pedro Alves <palves@redhat.com>
4171
4172 * tracepoint.c (save_string): Delete.
4173 (add_tracepoint_action): Use savestring instead of save_string.
4174
0b1afbb3
PA
41752013-02-12 Pedro Alves <palves@redhat.com>
4176
4177 * linux-xtensa-low.c: Ditto.
4178 * xtensa-xtregs.c: Ditto.
4179
8a4ac37e
PA
41802013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4181
4182 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4183 thread_db.
4184
148de6bb
MS
41852013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4186
4187 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4188 aarch64_num_wp_regs and aarch64_num_bp_regs to
4189 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4190
55fac6e0
MS
41912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4192
4193 * linux-aarch64-low.c (ps_get_thread_area): Replace
4194 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4195
176eb98c
MS
41962013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4197 Marcus Shawcroft <marcus.shawcroft@arm.com>
4198 Nigel Stephens <nigel.stephens@arm.com>
4199 Yufeng Zhang <yufeng.zhang@arm.com>
4200
4201 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4202 (aarch64.c, aarch64-without-fpu.c): New targets.
4203 * configure.srv (aarch64*-*-linux*): New.
4204 * linux-aarch64-low.c: New file.
4205
56f7af9c
MS
42062013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4207
43aaf8b6 4208 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4209 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4210 (dequeue_one_deferred_signal, linux_resume_one_thread)
4211 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4212 (linux_tracefork_grandchild, linux_test_for_tracefork)
4213 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4214 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4215 where the argument is 0.
4216
60f662b0
YQ
42172013-01-25 Yao Qi <yao@codesourcery.com>
4218
4219 * event-loop.c: Include "queue.h".
4220 (gdb_event_p): New typedef.
4221 (struct gdb_event) <next_event>: Remove.
4222 (event_queue): Change to QUEUE(gdb_event_p).
4223 (async_queue_event): Remove.
4224 (gdb_event_xfree): New.
4225 (initialize_event_loop): New.
4226 (process_event): Use API from QUEUE.
4227 (wait_for_event): Likewise.
4228 * server.c (main): Call initialize_event_loop.
4229 * server.h (initialize_event_loop): Declare.
4230
5ae4861a
YQ
42312013-01-18 Yao Qi <yao@codesourcery.com>
4232
4233 * ax.h (struct eval_agent_expr_context): New.
4234 (gdb_eval_agent_expr): Update declaration.
4235 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4236 TFRAME. Add new argument CTX.
4237 * server.h (struct eval_agent_expr_context): Declare.
4238 (agent_mem_read, agent_tsv_read): Update declaration.
4239 (agent_mem_read_string): Likewise.
4240 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4241 (add_traceframe_block): Add new argument TPOINT.
4242 Increase TPOINT->traceframe_usage.
4243 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4244 eval_tracepoint_agent_expr.
4245 (condition_true_at_tracepoint): Likewise.
4246 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4247 (agent_mem_read_string, agent_tsv_read): Likewise.
4248
85e00e85
YQ
42492013-01-16 Yao Qi <yao@codesourcery.com>
4250
4251 * linux-low.c (linux_resume_one_lwp): Don't check
4252 'lwp->bp_reinsert != 0'.
4253
4039cf45
JB
42542013-01-07 Joel Brobecker <brobecker@adacore.com>
4255 Pedro Alves <palves@redhat.com>
4256
4257 * lynx-low.c (ptrace_request_to_str): Define a temporary
4258 macro and use it to simplify this function's implementation.
4259
9044dee2
JB
42602013-01-07 Joel Brobecker <brobecker@adacore.com>
4261
4262 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4263 sets errno.
4264
e6352c8f
JB
42652013-01-07 Joel Brobecker <brobecker@adacore.com>
4266
4267 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4268
50681a27
JB
42692013-01-07 Joel Brobecker <brobecker@adacore.com>
4270
4271 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4272
3f6e77ef
JB
42732013-01-07 Joel Brobecker <brobecker@adacore.com>
4274
4275 * lynx-low.c (lynx_resume): Use the resume_info parameter
4276 to determine the ptid for the lynx_ptrace call, unless
4277 it is equal to minus_one_ptid, in which case we use the
4278 ptid of the current_inferior.
4279 (lynx_wait_1): After having received a thread create/exit
4280 event, resume the inferior's execution using the signaling
4281 thread's ptid, rather than the old ptid.
4282
7fda33ae
JB
42832013-01-07 Joel Brobecker <brobecker@adacore.com>
4284
4285 * lynx-low.c (lynx_resume): Delete variable ret.
4286
b9786c74
JB
42872013-01-01 Joel Brobecker <brobecker@adacore.com>
4288
4289 * gdbreplay.c (gdbreplay_version): Update copyright year.
4290 * server.c (gdbserver_version): Likewise.
4291
8b93d60f
JB
42922012-12-17 Joel Brobecker <brobecker@adacore.com>
4293
4294 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4295 new thread.
4296
037335a7
JB
42972012-12-17 Joel Brobecker <brobecker@adacore.com>
4298
4299 * lynx-low.c (ptrace_request_to_str): Add handling for
4300 PTRACE_GETTRACESIG.
4301
52d4cbd8
JB
43022012-12-17 Joel Brobecker <brobecker@adacore.com>
4303
4304 * lynx-low.c (lynx_attach): Delete variable new_process.
4305
ab8f6ca9
JB
43062012-12-17 Joel Brobecker <brobecker@adacore.com>
4307
4308 * lynx-low.c (lynx_create_inferior): Delete variable
4309 new_process.
4310
78cbc024
JB
43112012-12-17 Joel Brobecker <brobecker@adacore.com>
4312
4313 * lynx-low.c (ptrace_request_to_str): Do not handle
4314 PTRACE_GETTHREADLIST if this macro does not exist.
4315
14a00470
YQ
43162012-12-15 Yao Qi <yao@codesourcery.com>
4317
4318 * Makefile.in (OBS): Add notif.o.
4319 * notif.c, notif.h: New.
4320 * server.c: Include "notif.h".
4321 (struct vstop_notif) <next>: Remove.
4322 <base>: New field.
4323 (queue_stop_reply): Update.
4324 (push_event, send_next_stop_reply): Remove.
4325 (discard_queued_stop_replies): Update.
4326 (notif_stop): New variable.
4327 (handle_v_stopped): Remove.
4328 (handle_v_requests): Don't call handle_v_stopped. Call
4329 handle_ack_notif instead.
4330 (queue_stop_reply_callback): Call notif_event_enque instead
4331 of queue_stop_reply.
4332 (handle_status): Don't call send_next_stop_reply, call
4333 notif_write_event instead.
4334 (kill_inferior_callback): Likewise.
4335 (detach_or_kill_inferior_callback): Likewise.
4336 (main): Call initialize_notif.
4337 (process_serial_event): Call QUEUE_is_empty.
4338 (handle_target_event): Call notif_push instead of push event.
4339 * server.h (push_event): Remove declaration.
4340
61c125b9
TT
43412012-12-10 Tom Tromey <tromey@redhat.com>
4342
4343 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4344 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4345 macros.
4346 (.c.o): Rewrite.
4347 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4348 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4349 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4350 (amd64-linux-ipa.o, ax.o): Rewrite.
4351 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4352 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4353 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4354 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4355 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4356 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4357 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4358 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4359 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4360 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4361 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4362 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4363 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4364 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4365 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4366 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4367 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4368 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4369 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4370 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4371 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4372 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4373 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4374 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4375 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4376 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4377 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4378 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4379 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4380 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4381 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4382 (reg-tilegx.o): Remove.
4383 (all_object_files): New macro.
4384 Include .deps files.
4385 * aclocal.m4, configure: Rebuild.
4386 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4387 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4388 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4389
e90e9ad9
TT
43902012-12-05 Tom Tromey <tromey@redhat.com>
4391
4392 PR gdb/14917:
4393 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4394
02d403bf 43952012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4396
4397 * configure.ac: Check for linux/perf_event.h.
4398 * config.in: Regenerated.
4399 * configure: Regenerated.
4400
0270a750
PA
44012012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4402
4403 * hostio.c (handle_readlink): Decrease buffer size
4404 parameter passed to readlink by one byte.
4405
8c29b58e
YQ
44062012-11-26 Yao Qi <yao@codesourcery.com>
4407
4408 * configure.ac (build_warnings): Append '-Wempty-body'.
4409 * configure: Regenerated.
4410 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4411 body.
4412
8bdce1ff
PM
44132012-11-15 Pierre Muller <muller@sourceware.org>
4414
4415 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4416 * config.in: Regenerate.
4417 * configure: Regenerate.
4418 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4419 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4420 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4421 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4422 header.
4423 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4424 instead of <sys/wait.h> header.
4425 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4426
02d403bf 44272012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4428
4429 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4430 (various make rules): Remove -DGDBSERVER
4431
fbd5db48
YQ
44322012-11-09 Yao Qi <yao@codesourcery.com>
4433
4434 * spu-low.c (current_ptid): Move it to ..
4435 * gdbthread.h: ... here. New.
4436 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4437 * server.c (myresume, process_serial_event): Likewise.
4438 * thread-db.c (thread_db_find_new_threads): Likewise.
4439 * tracepoint.c (run_inferior_command): Likewise.
4440
b3dc46ff
AB
44412012-10-01 Andrew Burgess <aburgess@broadcom.com>
4442
4443 * server.c (handle_search_memory_1): Include access length in
4444 warning message.
4445
07c04788
HPN
44462012-09-05 Michael Brandt <michael.brandt@axis.com>
4447
4448 * linux-crisv32-low.c: Fix compile errors.
4449
918d227b
YQ
44502012-09-04 Yao Qi <yao@codesourcery.com>
4451
4452 * tracepoint.c (cmd_qtsv): Adjust debug message.
4453 Don't check CUR_TPOINT.
4454
18c1b81a
YQ
44552012-08-28 Yao Qi <yao@codesourcery.com>
4456
4457 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4458 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4459 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4460 Remove declarations of xmalloc, xreallloc, xstrdup and
4461 freeargv.
4462 * Makefile.in (libiberty_h): New.
4463 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4464 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4465
dc82f37b
YQ
44662012-08-23 Yao Qi <yao@codesourcery.com>
4467
4468 * server.h: Remove declaration of 'xsnprintf'.
4469
406b1477
KS
44702012-08-22 Keith Seitz <keiths@redhat.com>
4471
4472 * server.h: Include build-gnulib-gbserver/config.h.
4473 * gdbreplay.c: Likewise.
4474
e6712ff1
DE
44752012-08-08 Doug Evans <dje@google.com>
4476
4477 * Makefile.in (SFILES): Add gdb_vecs.c.
4478 (OBS): Add gdb_vecs.o.
4479 (gdb_vecs_h, host_defs_h): New variables.
4480 (thread-db.o): Add $(gdb_vecs_h) dependency.
4481 (gdb_vecs.o): New rule.
4482 * thread-db.c: #include "gdb_vecs.h".
4483 (thread_db_load_search): Use a vector to iterate over path elements.
4484 Handle text appearing after "$pdir".
4485
4486 * configure.ac: Add check for strstr.
4487 * config.in: Regenerate.
4488 * configure: Regenerate.
4489
7c3270ae
UW
44902012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4491
4492 * hostio.c (handle_pread): If pread fails, fall back to attempting
4493 lseek/read.
4494 (handle_pwrite): Likewise for pwrite.
4495
b62e2b27
UW
44962012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4497
4498 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4499 between unsupported TYPE and unimplementable ADDR/LEN combination.
4500 (arm_insert_point): Act on new return value.
4501
78a99e91
PA
45022012-07-31 Pedro Alves <palves@redhat.com>
4503
4504 * server.c (process_point_options): Only skip tokens if we find
4505 one that is unrecognized. Don't treat 'X' specially while
4506 skipping unrecognized tokens.
4507
fcf303ab
UW
45082012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4509
4510 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4511 to 4-byte-align HW breakpoint addresses for Thumb.
4512
7255706c
YQ
45132012-07-27 Yao Qi <yao@codesourcery.com>
4514
4515 PR remote/14161.
4516
4517 * server.h: Declare gdb_agent_about_to_close.
4518 * target.c (kill_inferior): Include "agent.h".
4519 New. Send command 'kill'.
4520 * target.h (kill_inferior): Removed macro.
4521 * tracepoint.c (gdb_agent_about_to_close): New.
4522 (gdb_agent_helper_thread): Handle command 'close'.
4523 Wait endlessly until the inferior stops.
4524 Install gdb_agent_remove_socket to atexit hook.
4525 (agent_socket_name): New static variable.
4526 (gdb_agent_socket_init): Replace local variable 'name' with
4527 'agent_socket_name'.
4528 (gdb_agent_remove_socket): New.
4529
5a3f286f
YQ
45302012-07-27 Yao Qi <yao@codesourcery.com>
4531
4532 * server.c (process_point_options): Stop at 'X' when parsing.
4533
961bd387
ME
45342012-07-19 Michael Eager <eager@eagercon.com>
4535
a261b8f5 4536 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4537 to hw_execute.
4538 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4539 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4540 hardware breakpoint.
4541
aa7c7447
JK
45422012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4543
4544 * gdbserver/linux-low.c (initialize_low): Call
4545 linux_ptrace_init_warnings.
4546
7f216e7c
DE
45472012-07-02 Doug Evans <dje@google.com>
4548
4549 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4550 pointer to int.
4551
d3ce09f5
SS
45522012-07-02 Stan Shebs <stan@codesourcery.com>
4553
4554 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4555 (ax.o): Add it to build rule.
4556 (ax-ipa.o): Ditto.
4557 (OBS): Add format.o.
4558 (IPA_OBS): Add format.o.
4559 * server.c (handle_query): Claim support for breakpoint commands.
4560 (process_point_options): Add command case.
4561 (process_serial_event): Leave running if there are printfs in
4562 effect.
4563 * mem-break.h (any_persistent_commands): Declare.
4564 (add_breakpoint_commands): Declare.
4565 (gdb_no_commands_at_breakpoint): Declare.
4566 (run_breakpoint_commands): Declare.
4567 * mem-break.c (struct point_command_list): New struct.
4568 (struct breakpoint): New field command_list.
4569 (any_persistent_commands): New function.
4570 (add_commands_to_breakpoint): New function.
4571 (add_breakpoint_commands): New function.
4572 (gdb_no_commands_at_breakpoint): New function.
4573 (run_breakpoint_commands): New function.
4574 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4575 locally.
4576 * ax.c: Include format.h.
4577 (ax_printf): New function.
4578 (gdb_eval_agent_expr): Add printf opcode.
4579
2f8f6aed
YQ
45802012-06-13 Yao Qi <yao@codesourcery.com>
4581
4582 * server.c (start_inferior): Remove duplicated writes to fields
4583 'last_resume_kind' and 'last_status' of 'current_inferior'.
4584
0c9070b3
YQ
45852012-06-12 Yao Qi <yao@codesourcery.com>
4586 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4589 comment.
4590 * server.c (handle_v_cont): Extend comment.
4591
c52daf70
YQ
45922012-06-11 Yao Qi <yao@codesourcery.com>
4593
4594 * linux-low.c (linux_attach): Add 'static'.
4595
d38bbb0a
YQ
45962012-06-06 Yao Qi <yao@codesourcery.com>
4597
4598 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4599
89dc0afd
JK
46002012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4601
4602 Fix gcc -flto compilation warning.
4603 * server.c (main): Make variable multi_mode and attach volatile.
4604
75f62ce7
TJB
46052012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4606
4607 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4608 if the platform doesn't know about it.
4609
65f479b6
PA
46102012-05-30 Jeff Kenton <jkenton@tilera.com>
4611
4612 * Makefile.in (SFILES): Add linux-tile-low.c.
4613 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4614 * configure.srv: Handle tilegx-*-linux*.
4615 * linux-tile-low.c: New file.
4616
0c5bf5a9
JK
46172012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4618
4619 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4620
a493e3e2
PA
46212012-05-24 Pedro Alves <palves@redhat.com>
4622
4623 PR gdb/7205
4624
43aaf8b6 4625 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4626
2ea28649
PA
46272012-05-24 Pedro Alves <palves@redhat.com>
4628
4629 PR gdb/7205
4630
4631 Replace target_signal with gdb_signal throughout.
4632
8d409d16
MR
46332012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4634
4635 * linux-low.c (linux_store_registers): Avoid the copying sequence
4636 when no data has been retrieved by ptrace.
4637
23512c01
MGD
46382012-05-22 Will Deacon <will.deacon@arm.com>
4639
4640 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4641 Include asm/ptrace.h.
4642 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4643 already defined.
4644
4934b29e
MR
46452012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4646
4647 * linux-low.c (linux_store_registers): Don't re-retrieve data
4648 with ptrace that has already been obtained from /proc. Always
4649 copy any data retrieved with ptrace to the buffer supplied.
4650
bde24c0a
PA
46512012-05-11 Yao Qi <yao@codesourcery.com>
4652 Pedro Alves <palves@redhat.com>
4653
4654 * linux-low.c (enum stopping_threads_kind): New.
4655 (stopping_threads): Change type to `enum stopping_threads_kind'.
4656 (handle_extended_wait): If stopping and suspending threads, leave
4657 the new_lwp suspended too.
4658 (linux_wait_for_event): Adjust.
4659 (stop_all_lwps): Set `stopping_threads' to
4660 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4661 whether we're suspending threads or just stopping them. Assert no
4662 recursion happens.
4663
623b6bdf
YQ
46642012-04-29 Yao Qi <yao@codesourcery.com>
4665
4666 * server.h: Move some code to ...
4667 * gdbthread.h: ... here. New.
4668 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4669 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4670 (nto-low.o, win32-low.o): Likewise.
4671 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4672 * regcache.c, remote-utils.c, server.c: Likewise.
4673 * target.c, tracepoint.c, win32-low.c: Likewise.
4674
f15f9948
TJB
46752012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4676
4677 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4678 (PTRACE_ARG4_TYPE): Likewise.
4679 (PTRACE_XFER_TYPE): Likewise.
4680 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4681 ptrace to PTRACE_ARG3_TYPE.
4682 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4683 (PTRACE_ARG4_TYPE): Likewise.
4684 (PTRACE_XFER_TYPE): Likewise.
4685 (linux_detach_one_lwp): Cast fourth argument of
4686 ptrace to long then PTRACE_ARG4_TYPE.
4687 (regsets_fetch_inferior_registers): Cast third argument of
4688 ptrace to long then PTRACE_ARG3_TYPE.
4689 (regsets_store_inferior_registers): Likewise.
4690
38ea300a
PA
46912012-04-20 Pedro Alves <palves@redhat.com>
4692
4693 * configure: Regenerate.
4694
c971b7fa
PA
46952012-04-19 Pedro Alves <palves@redhat.com>
4696
43aaf8b6 4697 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4698 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4699 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4700 (all, install-only, uninstall, clean-info, all-lib, clean): No
4701 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4702 (maintainer-clean realclean distclean): Use subdir_do.
4703 (subdir_do): New.
4704 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4705 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4706 * acinclude.m4: Include acx_configure_dir.m4.
4707 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4708 calls. Call AC_PROG_RANLIB. Configure gnulib using
4709 ACX_CONFIGURE_DIR.
4710 (GNULIB): New.
4711 (GNULIB_STDINT_H): Adjust.
4712 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4713 * gdbreplay.c: Include build-gnulib/config.h.
4714 * server.h: Likewise.
4715 * aclocal.m4: Regenerate.
4716 * config.in: Regenerate.
4717 * configure: Regenerate.
c971b7fa 4718
809277f8
PA
47192012-04-19 Pedro Alves <palves@redhat.com>
4720
4721 * Makefile.in (LIBGNU, INCGNU): Adjust.
4722 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4723 (all, install-only, uninstall, clean-info, all-lib, clean)
4724 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4725 * configure.ac: Adjust AC_OUTPUT output.
4726 * aclocal.m4: Regenerate.
4727 * configure: Regenerate.
4728
fd9bb8b8
PA
47292012-04-19 Pedro Alves <palves@redhat.com>
4730
4731 * Makefile.in (generated_files): New.
4732 (server_h): Remove the explicit dependency on config.h, and depend
4733 on $generated_files.
4734
1c298c66
PA
47352012-04-19 Pedro Alves <palves@redhat.com>
4736
4737 * Makefile.in (INCGNU): Add -Ignulib.
4738
57c4b50b
PA
47392012-04-19 Pedro Alves <palves@redhat.com>
4740
4741 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4742 (INCGNU): ... this, and spell out -I here.
4743 (GNULIB_LIB): Rename to ...
4744 (LIBGNU): ... this.
4745 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4746
1030e047
PA
47472012-04-19 Pedro Alves <palves@redhat.com>
4748
4749 * config.in: Regenerate.
4750
447d4319
PA
47512012-04-19 Pedro Alves <palves@redhat.com>
4752
4753 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4754 * server.h (memmem): Remove declaration.
4755 * config.in: Regenerate.
4756 * configure: Regenerate.
4757
aad9eab9
YQ
47582012-04-19 Yao Qi <yao@codesourcery.com>
4759
4760 * Makefile.in (SFILES): Add common/vec.c.
4761 (OBS): Add vec.o.
4762 (vec.o): New rule.
4763
3e10640f
YQ
47642012-04-19 Yao Qi <yao@codesourcery.com>
4765
4766 * remote-utils.c (prepare_resume_reply): Replace with macro
4767 target_core_of_thread.
4768 * server.c (handle_qxfer_threads_proper): Likewise.
4769 * target.h (traget_core_of_thread): New macro.
4770
71622373
PA
47712012-04-18 Pedro Alves <palves@redhat.com>
4772
4773 * aclocal.m4: Regenerate.
4774 * configure: Regenerate.
4775
80d26939
YQ
47762012-04-16 Yao Qi <yao@codesourcery.com>
4777
4778 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4779 duplicated on address.
4780
42476b70
YQ
47812012-04-16 Yao Qi <yao@codesourcery.com>
4782
4783 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4784 (struct tracepoint_action_ops) <send>: New field.
4785 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4786 (agent_expr_send, x_tracepoint_action_send): New.
4787 (l_tracepoint_action_send): New.
4788 (cmd_qtdp): Download and install tracepoint
4789 according to `use_agent'.
4790 (run_inferior_command): Add one more parameter `len'.
4791 Update callers.
4792 (tracepoint_send_agent): New.
4793 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4794
7bc83639
YQ
47952012-04-16 Yao Qi <yao@codesourcery.com>
4796
4797 * tracepoint.c (download_tracepoints): Moved to ...
4798 (cmd_qtstart): ... here.
4799
5f18041e
YQ
48002012-04-14 Yao Qi <yao@codesourcery.com>
4801
4802 * tracepoint.c: Include inttypes.h.
4803 (struct collect_memory_action): Use sized types.
4804 (struct tracepoint): Likewise.
4805 (cmd_qtdp, stop_tracing): Update print specifiers.
4806 (cmd_qtp, response_tracepoint): Likewise.
4807 (collect_data_at_tracepoint): Likewise.
4808 (collect_data_at_step): Likewise.
4809
55a8c076
YQ
48102012-04-14 Yao Qi <yao@codesourcery.com>
4811
4812 Import gnulib module inttypes.
4813 * aclocal.m4, config.in, configure: Regenerated.
4814
dc750257
YQ
48152012-04-14 Yao Qi <yao@codesourcery.com>
4816
4817 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4818 Makefile and config.status at last.
4819
0ab5faf9
YQ
48202012-04-13 Yao Qi <yao@codesourcery.com>
4821
4822 * tracepoint.c: Include stdint.h unconditionally.
4823
18f5fd81
TJB
48242012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4825
4826 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4827 on BFD_HAVE_SYS_PROCFS_TYPE.
4828 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4829 * configure: Regenerate.
4830 * config.in: Likewise.
4831
4d47af5c
L
48322012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4833
4834 * Makefile.in (clean): Also remove x32.c x32-linux.c
4835 x32-avx.c x32-avx-linux.c.
4836 (x32.o): New target.
4837 (x32.c): Likewise.
4838 (x32-linux.o): Likewise.
4839 (x32-linux.c): Likewise.
4840 (x32-avx.o): Likewise.
4841 (x32-avx.c): Likewise.
4842 (x32-avx-linux.o): Likewise.
4843 (x32-avx-linux.c): Likewise.
4844
4845 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4846 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4847 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4848 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4849 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4850 i386/x32-avx-linux.xml.
4851
4852 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4853 (init_registers_x32_avx_linux): Likwise.
4854 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4855 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4856
ecedbe58
PA
48572012-04-13 Pedro Alves <palves@redhat.com>
4858
4859 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4860 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4861 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4862 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4863 the sub-make.
4864
c92b5177
L
48652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4866
4867 * linux-x86-low.c (compat_x32_clock_t): New.
4868 (compat_x32_siginfo_t): Likewise.
4869 (compat_x32_siginfo_from_siginfo): Likewise.
4870 (siginfo_from_compat_x32_siginfo): Likewise.
4871 (linux_is_elf64): Likewise.
4872 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4873 and siginfo_from_compat_x32_siginfo for x32.
4874 (x86_arch_setup): Set linux_is_elf64.
4875
214d508e
L
48762012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4877
4878 PR gdb/13969
4879 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4880 e_machine field.
4881 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4882 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4883 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4884 compatible with process.
4885
c9a1864a
YQ
48862012-04-12 Yao Qi <yao@codesourcery.com>
4887
4888 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4889 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4890 (install-only, install-info, clean): Handle sub dir gnulib.
4891 (all-lib, am--refresh): New targets.
4892 (memmem.o): Remove target.
4893 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4894 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4895 (AC_REPLACE_FUNCS): Remove memmem.
4896 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4897 (AC_OUTPUT): Generate Makefile in gnulib/.
4898 * aclocal.m4, config.in, configure: Regenerated.
4899
367ba2c2
MR
49002012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4901
4902 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4903
9d236627
PA
49042012-04-05 Pedro Alves <palves@redhat.com>
4905
4906 -Werror=strict-aliasing
4907
4908 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4909 pointer.
4910
111217b3
PA
49112012-04-04 Pedro Alves <palves@redhat.com>
4912
4913 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4914 (sparc_store_gregset_from_stack, sparc_store_gregset)
4915 (sparc_breakpoint_at): Fix formatting.
4916
8365dcf5
TJB
49172012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4918
4919 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4920 are available.
4921 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4922 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4923 * config.in: Regenerate.
4924 * configure: Likewise.
4925
689cc2ae
PA
49262012-03-29 Pedro Alves <palves@redhat.com>
4927
4928 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4929 Correct ptrace arguments.
4930
c14dfd32
PA
49312012-03-28 Pedro Alves <palves@redhat.com>
4932
4933 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4934 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4935 (IA64_FR1_REGNUM): New defines.
4936 (ia64_fetch_register): New.
4937 (the_low_target): Install it.
4938 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4939 field.
4940 * linux-low.c (linux_fetch_registers): Try the
4941 the_low_target.fetch_register hook first.
4942
4943 * linux-arm-low.c (the_low_target): Adjust.
4944 * linux-bfin-low.c (the_low_target): Adjust.
4945 * linux-cris-low.c (the_low_target): Adjust.
4946 * linux-crisv32-low.c (the_low_target): Adjust.
4947 * linux-m32r-low.c (the_low_target): Adjust.
4948 * linux-m68k-low.c (the_low_target): Adjust.
4949 * linux-mips-low.c (the_low_target): Adjust.
4950 * linux-ppc-low.c (the_low_target): Adjust.
4951 * linux-s390-low.c (the_low_target): Adjust.
4952 * linux-sh-low.c (the_low_target): Adjust.
4953 * linux-sparc-low.c (the_low_target): Adjust.
4954 * linux-tic6x-low.c (the_low_target): Adjust.
4955 * linux-x86-low.c (the_low_target): Adjust.
4956 * linux-xtensa-low.c (the_low_target): Adjust.
4957
63c88e13
PA
49582012-03-26 Pedro Alves <palves@redhat.com>
4959
4960 * server.c (handle_qxfer_libraries): Don't bail early if
4961 the_target->qxfer_libraries_svr4 is not NULL.
4962
fb723180
PA
49632012-03-26 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4966
0afae3cf
PA
49672012-03-23 Pedro Alves <palves@redhat.com>
4968
4969 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4970 "library-list-svr4" element's start tag when the the DSO list is
4971 empty.
4972
485f1ee4
PA
49732012-03-23 Pedro Alves <palves@redhat.com>
4974
4975 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4976 a variable whose type size is the same as the inferior's pointer
4977 size.
4978
a5362b9a
TS
49792012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4980
4981 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4982 struct siginfo.
4983 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4985 * linux-low.h: Include <signal.h>.
4986 (struct siginfo): Remove forward declaration.
4987 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4988 struct siginfo.
4989
d226c142
MF
49902012-03-21 Mike Frysinger <vapier@gentoo.org>
4991
4992 * .gitignore: Ignore more files.
4993
122f36ef
PA
49942012-03-19 Pedro Alves <palves@redhat.com>
4995 Jan Kratochvil <jan.kratochvil@redhat.com>
4996
4997 * server.c (cont_thread, general_thread): Add describing comments.
4998 (start_inferior): Clear `cont_thread'.
4999 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5000 of a process.
5001
fc3e5175
YQ
50022012-03-15 Yao Qi <yao@codesourcery.com>
5003
5004 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5005 handling to ...
5006 (cmd_qtdp): ... here.
5007
8d0d92cd
YQ
50082012-03-15 Yao Qi <yao@codesourcery.com>
5009
5010 * tracepoint.c (struct tracepoint_action_ops): New.
5011 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5012 (m_tracepoint_action_download): New.
5013 (r_tracepoint_action_download): New.
5014 (x_tracepoint_action_download): New.
5015 (l_tracepoint_action_download): New.
5016 (add_tracepoint_action): Install `action->ops' according type.
5017 (download_tracepoint_1): Move code `download' function pointer
5018 of various tracepoint_action_ops.
5019
87b0bb13
JK
50202012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5021
5022 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5023 linux_ptrace_attach_warnings.
5024
5f572dec
JK
50252012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5026
5027 * Makefile.in (linux-ptrace.o): New.
5028 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5029 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5030 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5031 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5032 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5033 of these targets.
5034 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5035
f4647387
YQ
50362012-03-08 Yao Qi <yao@codesourcery.com>
5037 Pedro Alves <palves@redhat.com>
5038
5039 Fix PR server/13392.
5040 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5041 offset of JMP insn.
5042 * tracepoint.c (remove_tracepoint): New.
5043 (cmd_qtdp): Call remove_tracepoint when failed to install.
5044
9b224c5e
PA
50452012-03-07 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (get_detach_signal): New.
5048 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5049 Pass on pending signals to PTRACE_DETACH. Check the result of the
5050 ptrace call.
5051 * server.c (program_signals, program_signals_p): New.
5052 (handle_general_set): Handle QProgramSignals.
5053 * server.h (program_signals, program_signals_p): Declare.
5054
e237a7e2
JK
50552012-03-05 Pedro Alves <palves@redhat.com>
5056 Jan Kratochvil <jan.kratochvil@redhat.com>
5057
5058 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5059 New comment why.
5060
5808517f
YQ
50612012-03-03 Yao Qi <yao@codesourcery.com>
5062
5063 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5064 agent_look_up_symbols.
5065
58b4daa5
YQ
50662012-03-03 Yao Qi <yao@codesourcery.com>
5067
5068 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5069 (linux-x86-low.o): Likewise.
5070 * server.h: Remove in_process_agent_loaded.
5071 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5072 common/agent.c.
5073 Update callers.
5074
8ffcbaaf
YQ
50752012-03-03 Yao Qi <yao@codesourcery.com>
5076
5077 * tracepoint.c (gdb_agent_capability): New global.
5078 (in_process_agent_loaded_ust): Renamed to
5079 `in_process_agent_supports_ust'.
5080 Update callers.
5081 (in_process_agent_supports_ust): Call agent_capability_check.
5082 (clear_installed_tracepoints): Assert that agent supports
5083 agent.
5084
d1feda86
YQ
50852012-03-03 Yao Qi <yao@codesourcery.com>
5086
5087 * linux-low.c (linux_supports_agent): New.
5088 (linux_target_ops): Initialize field `supports_agent' with
5089 linux_supports_agent.
5090 * target.h (struct target_ops) <supports_agent>: New.
5091 (target_supports_agent): New macro.
5092 * server.c (handle_general_set): Handle packet 'QAgent'.
5093 (handle_query): Send `QAgent+'.
5094 * Makefile.in (server.o): Depends on agent.h.
5095
2fa291ac
YQ
50962012-03-03 Yao Qi <yao@codesourcery.com>
5097
5098 * Makefile.in (OBS): Add agent.o.
5099 Add new rule for agent.o.
5100 Track dependence of tracepoint.c on agent.h.
5101 * tracepoint.c (run_inferior_command_1):
5102 (run_inferior_command): Call agent_run_command.
5103 (gdb_ust_connect_sync_socket): Deleted. Move it to
5104 common/agent.c.
5105 (resume_thread, stop_thread): Likewise.
5106 (gdb_ust_socket_init): Renamed to ...
5107 (gdb_agent_socket_init): ... New.
5108 (gdb_ust_thread): Renamed to ...
5109 (gdb_agent_helper_thread): ... New.
5110 (gdb_ust_init): Move some code to ...
5111 (gdb_agent_init): ... here. New.
5112 [HAVE_UST]: Call gdb_ust_init.
5113 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5114 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5115 * config.in, configure: Regenerated.
5116
05044653
PA
51172012-03-02 Pedro Alves <palves@redhat.com>
5118
5119 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5120 * linux-low.c (struct simple_pid_list): New.
5121 (stopped_pids): New a struct simple_pid_list pointer.
5122 (add_to_pid_list, pull_pid_from_list): New.
5123 (handle_extended_wait): Don't assume the first signal new children
5124 report is SIGSTOP. Adjust call to pull_pid_from_list.
5125 (linux_wait_for_lwp): Adjust.
5126
8d00225b
YQ
51272012-03-02 Yao Qi <yao@codesourcery.com>
5128
5129 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5130 debug log.
5131
19560ba5
YQ
51322012-03-02 Yao Qi <yao@codesourcery.com>
5133
5134 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5135 `stop_pc' and `tpoint'. Update caller.
5136
1faeff08
MR
51372012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5138
5139 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5140 * linux-low.c (use_linux_regsets): New macro.
5141 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5142 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5143 (linux_register_in_regsets): New function.
5144 (usr_fetch_inferior_registers): Skip registers covered by
5145 regsets.
5146 (usr_store_inferior_registers): Likewise.
5147 (usr_fetch_inferior_registers): New macro.
5148 (usr_store_inferior_registers): Likewise.
5149 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5150 (linux_store_registers): Likewise.
5151 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5152 prototype.
5153 (init_registers_mips64_dsp_linux): Likewise.
5154 (init_registers_mips_linux): New macro.
5155 (init_registers_mips_dsp_linux): Likewise.
5156 (mips_dsp_num_regs): Likewise.
5157 (DSP_BASE, DSP_CONTROL): New fallback macros.
5158 (mips_base_regs): New macro.
5159 (mips_regmap): Use it. Fix the size.
5160 (mips_dsp_regmap): New variable.
5161 (mips_dsp_regset_bitmap): Likewise.
5162 (mips_arch_setup): New function.
5163 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5164 than mips_regmap.
5165 (mips_cannot_store_register): Likewise.
5166 (the_low_target): Update .arch_setup, .num_regs and .regmap
5167 initializers. Add .regset_bitmap initializer.
5168 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5169 initializer.
5170 * linux-bfin-low.c (the_low_target): Likewise.
5171 * linux-cris-low.c (the_low_target): Likewise.
5172 * linux-crisv32-low.c (the_low_target): Likewise.
5173 * linux-ia64-low.c (the_low_target): Likewise.
5174 * linux-m32r-low.c (the_low_target): Likewise.
5175 * linux-m68k-low.c (the_low_target): Likewise.
5176 * linux-ppc-low.c (the_low_target): Likewise.
5177 * linux-s390-low.c (the_low_target): Likewise.
5178 * linux-sh-low.c (the_low_target): Likewise.
5179 * linux-sparc-low.c (the_low_target): Likewise.
5180 * linux-tic6x-low.c (the_low_target): Likewise.
5181 * linux-x86-low.c (the_low_target): Likewise.
5182 * linux-xtensa-low.c (the_low_target): Likewise.
5183 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5184 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5185 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5186 srv_xmlfiles.
5187 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5188 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5189
c03e6ccc
YQ
51902012-02-29 Yao Qi <yao@codesourcery.com>
5191 Pedro Alves <palves@redhat.com>
5192
5193 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5194 `step_over_finished' is true.
5195
644cebc9
PA
51962012-02-27 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5199 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5200
c14d7ab2
PA
52012012-02-27 Pedro Alves <palves@redhat.com>
5202
5203 PR server/9684
5204 * linux-low.c (pid_is_stopped): New.
5205 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5206
412c89dd
LM
52072012-02-25 Luis Machado <lgustavo@codesourcery.com>
5208
5209 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5210 of conditions.
5211
b745defe
MR
52122012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5213
5214 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5215
9f3a5c85
LM
52162012-02-24 Luis Machado <lgustavo@codesourcery>
5217
5218 * server.c (handle_query): Advertise support for target-side
5219 breakpoint condition evaluation.
5220 (process_point_options): New function.
5221 (process_serial_event): When inserting a breakpoint, check for
5222 a target-side condition that should be evaluated.
5223
5224 * mem-break.c: Include regcache.h and ax.h.
5225 (point_cond_list_t): New data structure.
5226 (breakpoint) <cond_list>: New field.
5227 (find_gdb_breakpoint_at): Make non-static.
5228 (delete_gdb_breakpoint_at): Clear any target-side
5229 conditions.
5230 (clear_gdb_breakpoint_conditions): New function.
5231 (add_condition_to_breakpoint): Likewise.
5232 (add_breakpoint_condition): Likewise.
5233 (gdb_condition_true_at_breakpoint): Likewise.
5234 (gdb_breakpoint_here): Return result directly instead
5235 of going through a local variable.
5236
5237 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5238 (clear_gdb_breakpoint_conditions): Likewise.
5239 (add_breakpoint_condition): Likewise.
5240 (gdb_condition_true_at_breakpoint): Likewise.
5241
5242 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5243 (need_step_over_p): Take target-side breakpoint condition into
5244 consideration.
5245
5e1dc496
LM
52462012-02-24 Luis Machado <lgustavo@codesourcery>
5247
5248 * server.h: Include tracepoint.h.
5249 (agent_mem_read, agent_get_trace_state_variable_value,
5250 agent_set_trace_state_variable_value,
5251 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5252 get_set_tsv_func_addr): New prototypes.
5253
5254 * ax.h: New include file.
5255 * ax.c: New source file.
5256
5257 * tracepoint.c: Include ax.h.
5258 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5259 agent_expr, eval_result_type): Move to ax.h.
5260 (parse_agent_expr): Rename to ...
5261 (gdb_parse_agent_expr): ... this, make it non-static and move
5262 to ax.h.
5263 (unparse_agent_expr) Rename to ...
5264 (gdb_unparse_agent_expr): ... this, make it non-static and move
5265 to ax.h.
5266 (eval_agent_expr): Rename to ...
5267 (eval_tracepoint_agent_expr): ... this.
5268 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5269 forward declarations.
5270 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5271 (agent_get_trace_state_variable_value): New function.
5272 (agent_set_trace_state_variable_value): New function.
5273 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5274 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5275 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5276 (condition_true_at_tracepoint): Likewise.
5277 (parse_agent_expr): Rename to ...
5278 (gdb_parse_agent_expr): ... this and move to ax.c.
5279 (unparse_agent_expr): Rename to ...
5280 (gdb_unparse_agent_expr): ... this and move to ax.c.
5281 (gdb_agent_op_name): Move to ax.c.
5282 (eval_agent_expr): Rename to ...
5283 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5284 and move to ax.c.
5285 (eval_tracepoint_agent_expr): New function.
5286 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5287 non-static.
5e1dc496
LM
5288 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5289 ax.c.
5290 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5291 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5292 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5293 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5294 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5295 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5296 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5297 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5298 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5299 (compile_bytecodes): Remove forward declaration.
5300 (is_goto_target): Move to ax.c.
5301 (compile_bytecodes): Move to ax.c and call
5302 agent_get_trace_state_variable_value (...) and
5303 agent_set_trace_state_variable_value (...).
5304
5305 * Makefile.in: Update ax.c and IPA dependencies.
5306
277e4e52
PA
53072012-02-24 Pedro Alves <palves@redhat.com>
5308
5309 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5310 (cmd_bigqtbuffer_circular): ... this. Only handle
5311 'QTBuffer:circular:'.
5312 (handle_tracepoint_general_set): Adjust.
5313
bf4c19f7
YQ
53142012-02-16 Yao Qi <yao@codesourcery.com>
5315
5316 * inferiors.c: Move code to ...
5317 * dll.c: .... here. New.
5318 * server.h: Declare clear_dlls.
5319 * Makefile.in (SFILES): Add dll.c.
5320 (OBS): Add dll.o
5321 (dll.o): New rule.
5322
d73f2619
YQ
53232012-02-11 Yao Qi <yao@codesourcery.com>
5324
5325 * server.c: (handle_monitor_command): Add a new parameter
5326 `own_buf'.
5327 (handle_query): Update caller.
5328
f8255c2a
JB
53292012-02-09 Joel Brobecker <brobecker@adacore.com>
5330
5331 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5332 * configure, config.in: Regenerate.
5333 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5334 is not defined.
5335
da84f473
PA
53362012-02-02 Pedro Alves <palves@redhat.com>
5337
5338 Try SIGKILL first, then PTRACE_KILL.
5339 * linux-low.c (linux_kill_one_lwp): New.
5340 (linux_kill_one_lwp): Rename to ...
5341 (kill_one_lwp_callback): ... this. Use the new
5342 linux_kill_one_lwp.
5343
e886a173
PA
53442012-02-02 Pedro Alves <palves@redhat.com>
5345
5346 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5347 inferior.
5348
be07f1a2
PA
53492012-01-27 Pedro Alves <palves@redhat.com>
5350
5351 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5352 (elf_64_file_p): Make static.
5353 (linux_pid_exe_is_elf_64_file): New.
5354 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5355 Delete declarations.
5356 (linux_pid_exe_is_elf_64_file): Declare.
5357 * linux-x86-low.c (x86_arch_setup): Use
5358 linux_pid_exe_is_elf_64_file.
5359
d8301ad1
JK
53602012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5361
5362 * linux-low.c (linux_wait_for_event_1): Rename to ...
5363 (linux_wait_for_event): ... here and merge it with former
5364 linux_wait_for_event - new variable wait_ptid, use it.
5365 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5366
01b17894
PA
53672012-01-23 Pedro Alves <palves@redhat.com>
5368
5369 * server.c (main): Avoid yet another case of infinite loop while
5370 detaching/killing after a longjmp.
5371
e825046f
JK
53722012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5373
5374 Code cleanup.
5375 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5376
b9e7b9c3
UW
53772012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5378
5379 * hostio.c (handle_readlink): New function.
5380 (handle_vFile): Call it to handle "vFile:readlink" packets.
5381
901f9912
UW
53822012-01-20 Pedro Alves <palves@redhat.com>
5383 Ulrich Weigand <ulrich.weigand@linaro.org>
5384
5385 * server.c (handle_v_requests): Only support vAttach and vRun to
5386 start multiple processes when in extended protocol mode.
5387
fc1ab1a0
PA
53882012-01-17 Pedro Alves <palves@redhat.com>
5389
5390 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5391 memalign plus mprotect to allocate the scratch buffer.
5392
7d5d4e98
PA
53932012-01-13 Pedro Alves <palves@redhat.com>
5394
5395 * server.c (attach_inferior): Clear `cont_thread'.
5396
f128d5e9
PA
53972012-01-13 Pedro Alves <palves@redhat.com>
5398
5399 * server.c (main): Avoid infinite loop while detaching/killing
5400 after a longjmp.
5401
06db92f0
DE
54022012-01-09 Doug Evans <dje@google.com>
5403
5404 * server.c (start_inferior): Set last_ptid in --wrapper case.
5405
32d92999
YQ
54062012-01-06 Yao Qi <yao@codesourcery.com>
5407
5408 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5409 defined.
5410 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5411
5e0a92a9
YQ
54122012-01-04 Yao Qi <yao@codesourcery.com>
5413
5414 * tracepoint.c (cmd_qtdp): Print debug message
5415 for static tracepoint.
5416
ae639e8c
YQ
54172012-01-04 Yao Qi <yao@codesourcery.com>
5418
5419 * tracepoint.c (trace_vdebug): Differentiate debug message
5420 between gdbserver and IPA.
5421
f72429c5
YQ
54222012-01-03 Yao Qi <yao@codesourcery.com>
5423
5424 * tracepoint.c (tracepoint_was_hit): Don't collect for
5425 static tracepoint.
5426
12c3e59c
JB
54272012-01-02 Joel Brobecker <brobecker@adacore.com>
5428
5429 * terminal.h: Reformat copyright header.
5430
67827812
JB
54312012-01-02 Joel Brobecker <brobecker@adacore.com>
5432
5433 * server.c (gdbserver_version): Update copyright year.
5434 * gdbreplay.c (gdbreplay_version): Likewise.
5435
3e52c33d
JK
54362011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5437
5438 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5439
5440 Revert:
5441 2011-12-18 Hui Zhu <teawater@gmail.com>
5442 * linux-low.c (linux_create_inferior): Save return value to ret.
5443
66f1260e
HZ
54442011-12-18 Hui Zhu <teawater@gmail.com>
5445
5446 * linux-low.c (linux_create_inferior): Save return value to ret.
5447
e77616d7
DE
54482011-12-16 Doug Evans <dje@google.com>
5449
e7b06c57
DE
5450 * linux-low.c (linux_create_inferior): If stdio connection,
5451 redirect stdin from /dev/null, stdout to stderr.
5452 * remote-utils.c (remote_is_stdio): New static global.
5453 (remote_connection_is_stdio): New function.
5454 (remote_prepare): Handle stdio connection.
5455 (remote_open): Ditto.
5456 (remote_close): Don't close stdin for stdio connections.
5457 (read_prim,write_prim): New functions. Replace all calls to
5458 read/write to these.
5459 * server.c (main): Watch for "-" argument. Move call to
5460 remote_prepare before start_inferior.
5461 * server.h (STDIO_CONNECTION_NAME): New macro.
5462 (remote_connection_is_stdio): Declare.
5463
e77616d7
DE
5464 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5465 in debugging output.
5466
82067193
YQ
54672011-12-15 Yao Qi <yao@codesourcery.com>
5468
5469 * tracepoint.c: Include sys/syscall.h.
5470 (gdb_ust_thread): Remove preprocessor conditional.
5471
82bfbe7e
PA
54722011-12-14 Pedro Alves <pedro@codesourcery.com>
5473
5474 * linux-low.c (linux_detach_one_lwp): Call
5475 the_low_target.prepare_to_resume before detaching.
5476
712c6575
YQ
54772011-12-14 Yao Qi <yao@codesourcery.com>
5478
5479 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5480 of write.
5481
d54d1edf
YQ
54822011-12-14 Yao Qi <yao@codesourcery.com>
5483
5484 * i386-low.c (i386_low_stopped_data_address): Initialize local
5485 variable `control'.
5486
6210a125
PA
54872011-12-13 Pedro Alves <pedro@codesourcery.com>
5488
5489 PR remote/13492
5490
5491 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5492 DR_CONTROL unless necessary. Extend comments.
5493 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5494 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5495
2ece8244
YQ
54962011-12-13 Yao Qi <yao@codesourcery.com>
5497
5498 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5499 macros.
5500 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5501
784867a5
JK
55022011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5503
5504 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5505 Print new debug message for such case.
5506
6bf36717
JK
55072011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5508
5509 Fix overlapping memcpy.
5510 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5511 the read_inferior_memory transfer.
5512 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5513 write_inferior_memory transfer.
5514 (set_fast_tracepoint_jump): New variable buf. Use it for the
5515 read_inferior_memory and write_inferior_memory transfers.
5516 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5517 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5518 Use it for the write_inferior_memory transfer.
5519 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5520 buffers.
5521
50275556
MR
55222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5523
5524 * linux-low.c (fetch_register, store_register): Make code
5525 consistent, fix formatting.
5526
7325beb4
MR
55272011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5528
5529 * linux-low.c (usr_store_inferior_registers): Factor out code
5530 to handle individual registers into...
5531 (store_register): ... this new function.
5532
c642a434
UW
55332011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5534
5535 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5536 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5537 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5538 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5539 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5540 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5541 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5542 (srv_xmlfiles): Add new XML files.
5543
5544 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5545 and <sys/uio.h>.
5546 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5547 (init_registers_s390_linux32v1): Add prototype.
5548 (init_registers_s390_linux32v2): Likewise.
5549 (init_registers_s390_linux64v1): Likewise.
5550 (init_registers_s390_linux64v2): Likewise.
5551 (init_registers_s390x_linux64v1): Likewise.
5552 (init_registers_s390x_linux64v2): Likewise.
5553 (s390_num_regs): Increment to 52.
5554 (s390_regmap): Add orig_r2 register.
5555 (s390_num_regs_3264): Increment to 68.
5556 (s390_regmap_3264): Add orig_r2 register.
5557 (s390_collect_ptrace_register): Handle orig_r2 register.
5558 (s390_supply_ptrace_register): Likewise.
5559 (s390_fill_last_break): New function.
5560 (s390_store_last_break): Likewise.
5561 (s390_fill_system_call): New function.
5562 (s390_store_system_call): Likewise.
5563 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5564 register sets.
5565 (s390_check_regset): New function.
5566 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5567 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5568 Update target_regsets for available register sets.
5569
2268b414
JK
55702011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5571 Jan Kratochvil <jan.kratochvil@redhat.com>
5572
5573 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5574 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5575 New.
5576 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5577 * linux-low.h (struct process_info_private): New member r_debug.
5578 * server.c (handle_qxfer_libraries): Call
5579 the_target->qxfer_libraries_svr4.
5580 (handle_qxfer_libraries_svr4): New function.
5581 (qxfer_packets): New entry "libraries-svr4".
5582 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5583 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5584 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5585 PACKET_qXfer_libraries_svr4.
5586
d6db1fab
UW
55872011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5588
5589 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5590 PSW address/mask between 8-byte and 16-byte formats.
5591 (s390_supply_ptrace_register): Likewise.
5592 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5593 basic addressing mode bit.
5594
242f5f1c
SS
55952011-11-24 Stan Shebs <stan@codesourcery.com>
5596
5597 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5598
f196051f
SS
55992011-11-17 Stan Shebs <stan@codesourcery.com>
5600
5601 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5602 (tracing_start_time): New global.
5603 (tracing_stop_time): New global.
5604 (tracing_user_name): New global.
5605 (tracing_notes): New global.
5606 (tracing_stop_note): New global.
5607 (cmd_qtstart): Set traceframe_usage, start_time.
5608 (stop_tracing): Set stop_time.
5609 (cmd_qtstatus): Report additional status.
5610 (cmd_qtp): New function.
5611 (handle_tracepoint_query): Call it.
5612 (cmd_qtnotes): New function.
5613 (handle_tracepoint_general_set): Call it.
5614 (get_timestamp): Rename from tsv_get_timestamp.
5615
405f8e94
SS
56162011-11-14 Stan Shebs <stan@codesourcery.com>
5617 Kwok Cheung Yeung <kcy@codesourcery.com>
5618
5619 * linux-x86-low.c (small_jump_insn): New.
5620 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5621 trampoline and error message, build a trampoline and issue a small
5622 jump instruction to it.
5623 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5624 trampoline and error message.
5625 (x86_get_min_fast_tracepoint_insn_len): New.
5626 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5627 * linux-low.h (struct linux_target_ops): Add arguments to
5628 install_fast_tracepoint_jump_pad operation, add new operation.
5629 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5630 arguments.
5631 (linux_get_min_fast_tracepoint_insn_len): New function.
5632 (linux_target_op): Add new operation.
5633 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5634 (gdb_trampoline_buffer_end): Ditto.
5635 (gdb_trampoline_buffer_error): Ditto.
5636 (struct ipa_sym_addresses): Add fields for new IPA variables.
5637 (symbol_list): Add entries for new IPA variables.
5638 (struct tracepoint): Add fields to hold the address range of the
5639 trampoline used by the tracepoint.
5640 (trampoline_buffer_head): New static variable.
5641 (trampoline_buffer_tail): Ditto.
5642 (claim_trampoline_space): New function.
5643 (have_fast_tracepoint_trampoline_buffer): New function.
5644 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5645 structure.
5646 (install_fast_tracepoint): Ditto, also add error buffer argument.
5647 (cmd_qtminftpilen): New function.
5648 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5649 (fast_tracepoint_from_trampoline_address): New function.
5650 (fast_tracepoint_collecting): Handle trampoline as part of jump
5651 pad space.
5652 (set_trampoline_buffer_space): New function.
5653 (initialize_tracepoint): Initialize new IPA variables.
5654 * target.h (struct target_ops): Add arguments to
5655 install_fast_tracepoint_jump_pad operation, add new
5656 get_min_fast_tracepoint_insn_len operation.
5657 (target_get_min_fast_tracepoint_insn_len): New.
5658 (install_fast_tracepoint_jump_pad): Add arguments.
5659 * server.h (IPA_BUFSIZ): Define.
5660 * linux-i386-ipa.c: Include extra header files.
5661 (initialize_fast_tracepoint_trampoline_buffer): New function.
5662 (initialize_low_tracepoint): Call it.
5663 * server.h (set_trampoline_buffer_space): Declare.
5664 (claim_trampoline_space): Ditto.
5665 (have_fast_tracepoint_trampoline_buffer): Ditto.
5666
1e4d1764
YQ
56672011-11-14 Yao Qi <yao@codesourcery.com>
5668
5669 * server.c (handle_query): Handle InstallInTrace for qSupported.
5670 * tracepoint.c (add_tracepoint): Sort list.
5671 (install_tracepoint, download_tracepoint): New.
5672 (cmd_qtdp): Call them to install and download tracepoints.
5673 (sort_tracepoints): Removed.
5674 (cmd_qtstart): Update.
5675
5c73ff4e
YQ
56762011-11-14 Yao Qi <yao@codesourcery.com>
5677
5678 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5679 * mem-break.h: Declare.
5680 * tracepoint.c (cmd_qtstart): Move some code to ...
5681 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5682 New.
5683 (download_tracepoints): Move some code to ...
5684 (download_tracepoint_1): ... here. New.
5685
86a30030
YQ
56862011-11-08 Yao Qi <yao@codesourcery.com>
5687
5688 * remote-utils.c (relocate_instruction): A comment fix.
5689
8d26e50c
JB
56902011-11-07 Joel Brobecker <brobecker@adacore.com>
5691
5692 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5693 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5694 dr_status_mirror and dr_control_mirror from debug_reg_state.
5695 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5696 (i386_initial_stuff): Remove use of deleted globals.
5697 (i386_get_thread_context, i386_set_thread_context,
5698 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5699 from debug_reg_state.
5700
a59306a3
YQ
57012011-11-05 Yao Qi <yao@codesourcery.com>
5702
5703 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5704 address as TPOINT's.
5705
3065dfb6
SS
57062011-11-02 Stan Shebs <stan@codesourcery.com>
5707
5708 * tracepoint.c (agent_mem_read_string): New function.
5709 (eval_agent_expr): Call it for tracenz.
5710 * server.c (handle_query): Report support for tracenz.
5711
fd0d8c7c
YQ
57122011-11-02 Yao Qi <yao@codesourcery.com>
5713
5714 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5715
609086b1
YQ
57162011-11-02 Yao Qi <yao@codesourcery.com>
5717
5718 * target.h: Fix a typo in comment.
5719
b9fd1791
PA
57202011-10-31 Pedro Alves <pedro@codesourcery.com>
5721
5722 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5723 clobber the breakpoints' shadows with fast tracepoint jumps.
5724 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5725 * target.c (write_inferior_memory): Also pass MYADDR down to
5726 check_mem_write.
5727
03583c20
UW
57282011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5729
5730 * configure.ac: Check support for personality routine.
5731 * configure: Regenerate.
5732 * config.in: Likewise.
5733 * linux-low.c: Include <sys/personality.h>.
5734 Define ADDR_NO_RANDOMIZE if necessary.
5735 (linux_create_inferior): Disable address space randomization when
5736 forking inferior, if requested.
5737 (linux_supports_disable_randomization): New function.
5738 (linux_target_ops): Install it.
5739 * server.h (disable_randomization): Declare.
5740 * server.c (disable_randomization): New global variable.
5741 (handle_general_set): Handle QDisableRandomization.
5742 (handle_query): Likewise for qSupported.
5743 (main): Support --disable-randomization and --no-disable-randomization
5744 command line arguments.
5745 * target.h (struct target_ops): Add supports_disable_randomization.
5746 (target_supports_disable_randomization): New macro.
5747
723b724b
MF
57482011-09-29 Mike Frysinger <vapier@gentoo.org>
5749
5750 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5751 ifdef check.
5752 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5753 [!PT_GETDSBT] (target_loadmap): New definition.
5754 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5755 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5756 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5757 and PT_GETDSBT to LINUX_LOADMAP.
5758 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5759 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5760
55329a5c 57612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5762
5763 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5764 (arm_linux_hwbp_cap): New static variable.
5765 (arm_linux_get_hwbp_cap): Replace by ...
5766 (arm_linux_init_hwbp_cap): ... this new function.
5767 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5768 (arm_linux_get_hw_watchpoint_count): Likewise.
5769 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5770 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5771 (arm_prepare_to_resume): Use perror_with_name instead of error.
5772
55329a5c 57732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5774
5775 * linux-arm-low.c: Include <signal.h>.
5776 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5777 (struct arm_linux_hwbp_cap): New data type.
5778 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5779 (struct arm_linux_hw_breakpoint): New data type.
5780 (MAX_BPTS, MAX_WPTS): Define.
5781 (struct arch_process_info, struct arch_lwp_info): New data types.
5782 (arm_linux_get_hwbp_cap): New function.
5783 (arm_linux_get_hw_breakpoint_count): Likewise.
5784 (arm_linux_get_hw_watchpoint_count): Likewise.
5785 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5786 (arm_hwbp_control_initialize): Likewise.
5787 (arm_hwbp_control_is_enabled): Likewise.
5788 (arm_hwbp_control_is_initialized): Likewise.
5789 (arm_hwbp_control_disable): Likewise.
5790 (arm_linux_hw_breakpoint_equal): Likewise.
5791 (arm_linux_hw_point_initialize): Likewise.
5792 (struct update_registers_data): New data structure.
5793 (update_registers_callback: New function.
5794 (arm_insert_point): Likewise.
5795 (arm_remove_point): Likewise.
5796 (arm_stopped_by_watchpoint): Likewise.
5797 (arm_stopped_data_address): Likewise.
5798 (arm_new_process): Likewise.
5799 (arm_new_thread): Likewise.
5800 (arm_prepare_to_resume): Likewise.
5801 (the_low_target): Register arm_insert_point, arm_remove_point,
5802 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5803 arm_new_thread, and arm_prepare_to_resume.
5804
6b9801d4
SS
58052011-09-15 Stan Shebs <stan@codesourcery.com>
5806
5807 * server.h (struct emit_ops): Add compare-goto fields.
5808 * tracepoint.c (gdb_agent_op_sizes): New table.
5809 (emit_eq_goto): New function.
5810 (emit_ne_goto): New function.
5811 (emit_lt_goto): New function.
5812 (emit_le_goto): New function.
5813 (emit_gt_goto): New function.
5814 (emit_ge_goto): New function.
5815 (is_goto_target): New function.
5816 (compile_bytecodes): Recognize special cases of compare-goto
5817 combinations and call specialized emitters for them.
5818 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5819 (amd64_emit_ne_goto): New function.
5820 (amd64_emit_lt_goto): New function.
5821 (amd64_emit_le_goto): New function.
5822 (amd64_emit_gt_goto): New function.
5823 (amd64_emit_ge_goto): New function.
5824 (amd64_emit_ops): Add the new functions.
5825 (i386_emit_eq_goto): New function.
5826 (i386_emit_ne_goto): New function.
5827 (i386_emit_lt_goto): New function.
5828 (i386_emit_le_goto): New function.
5829 (i386_emit_gt_goto): New function.
5830 (i386_emit_ge_goto): New function.
5831 (i386_emit_ops): Add the new functions.
5832
bf15cbda
SS
58332011-09-08 Stan Shebs <stan@codesourcery.com>
5834
5835 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5836 (i386_emit_epilogue): Restore %ebx.
5837
943ca1dd
JZ
58382011-08-31 Jie Zhang <jzhang918@gmail.com>
5839
5840 * server.c (step_thread): Remove definition.
5841 (process_serial_event): Don't handle Hs.
5842 * server.h (step_thread): Remove declaration.
5843 * target.c (set_desired_inferior): Remove use of step_thread.
5844
e3deef73
LM
58452011-08-24 Luis Machado <lgustavo@codesourcery.com>
5846
5847 * linux-low.c: Include linux-procfs.h.
5848 (linux_attach_lwp_1): Update comments.
5849 (linux_attach): Scan for existing threads when attaching to a
5850 process that is the tgid.
5851 * Makefile.in: Update dependencies.
5852
13da1c97
LM
58532011-08-24 Luis Machado <lgustavo@codesourcery.com>
5854
5855 * configure.srv: Add linux-procfs.o dependencies.
5856
881127c9
YQ
58572011-08-14 Yao Qi <yao@codesourcery.com>
5858
5859 * target.h (struct target_ops): Fix indent.
5860 * win32-low.c (win32_target_ops): Fix comment.
5861
58dbd541
YQ
58622011-08-14 Andrew Jenner <andrew@codesourcery.com>
5863 Yao Qi <yao@codesourcery.com>
5864
5865 * Makefile.in (clean): Remove tic6x-*.c files.
5866 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5867 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5868 (tic6x-c64xp-linux.c): Likewise.
5869 * configure.srv: Add support for tic6x-*-uclinux.
5870 * linux-tic6x-low.c: New.
5871 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5872
78d85199
YQ
58732011-08-14 Andrew Stubbs <ams@codesourcery.com>
5874 Yao Qi <yao@codesourcery.com>
5875
5876 * target.h (struct target_ops): Add read_loadmap.
5877 * linux-low.c (struct target_loadseg): New type.
5878 (struct target_loadmap): New type.
5879 (linux_read_loadmap): New function.
5880 (linux_target_ops): Add linux_read_loadmap.
5881 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5882 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5883 to NULL.
78d85199 5884
a959a88d
EZ
58852011-08-05 Eli Zaretskii <eliz@gnu.org>
5886
5887 * win32-low.c: Include <stdint.h>.
5888
1ced966e
PA
58892011-07-22 Pedro Alves <pedro@codesourcery.com>
5890
5891 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5892 to the inferior here.
5893 (i386_remove_aligned_watchpoint): Ditto.
5894 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5895 fit part of the watchpoint in the debug registers.
5896 (i386_update_inferior_debug_regs): New.
5897 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5898 registers, and only update the inferior on success.
5899 (i386_low_remove_watchpoint): Ditto.
5900
d26e3629
KY
59012011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5902
5903 * linux-low.c (compare_ints, unique, list_threads, show_process,
5904 linux_core_of_thread): Delete.
5905 (linux_target_ops): Change linux_core_of_thread to
5906 linux_common_core_of_thread.
5907 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5908 * utils.c (malloc_failure): Change type of argument.
5909 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5910 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5911 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5912 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5913 (IPA_OBJS): Add common-utils-ipa.o.
5914 (ptid_h, linux_osdata_h): New macros.
5915 (server_h): Add common/common-utils.h, common/xml-utils.h,
5916 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5917 common/ptid.h.
5918 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5919 ptid.o, buffer.o): New rules.
5920 (linux-low.o): Add common/linux-osdata.h as a dependency.
5921 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5922 * configure.ac: Add AC_HEADER_DIRENT check.
5923 * config.in: Regenerate.
5924 * configure: Regenerate.
5925 * remote-utils.c (xml_escape_text): Delete.
5926 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5927 buffer_xml_printf): Move to common/buffer.c.
5928 * server.c (main): Remove call to initialize_inferiors.
5929 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5930 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5931 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5932 internal_error, gdb_assert, gdb_assert_fail): Delete.
5933 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5934 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5935 common/buffer.h.
5936 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5937 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5938 initialize_inferiors): Delete.
5939
2275a1a7
PA
59402011-07-20 Pedro Alves <pedro@codesourcery.com>
5941
5942 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5943 symbol error.
5944
0a5b1e09
PA
59452011-05-31 Pedro Alves <pedro@codesourcery.com>
5946
5947 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5948 assertion.
5949 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5950
6938fd34
YQ
59512011-05-26 Yao Qi <yao@codesourcery.com>
5952
5953 * Makefile.in (thread-db.o): Track dependence to
5954 common/gdb_thread_db.h.
5955 * thread-db.c: include gdb_thread_db.h from right place.
5956
b481f9e0
TT
59572011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5958
5959 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5960 __FILE__ and __LINE__ to internal_error.
5961
98a5dd13
DE
59622011-05-13 Doug Evans <dje@google.com>
5963
5964 * thread-db.c (try_thread_db_load_from_sdir): New function.
5965 (try_thread_db_load_from_dir): New function.
5966 (thread_db_load_search): Handle $sdir, ignore $pdir.
5967 Remove trying of system directories if search of
5968 libthread-db-search-path fails, that is now done via $sdir.
5969
d248b706
KY
59702011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5971
5972 * server.c (handle_query): Add EnableDisableTracepoints to the list
5973 of supported features.
43aaf8b6 5974 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5975 tracepoints.
43aaf8b6
PA
5976 (cmd_qtenable_disable): New.
5977 (cmd_qtstart): Install tracepoints even if disabled.
5978 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5979 receiving a QTEnable or QTDisable packet.
5980 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5981 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5982 tracepoints.
5983 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5984
84e578fb
DE
59852011-05-10 Doug Evans <dje@google.com>
5986
5987 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5988
71f55dd8
DE
59892011-05-04 Doug Evans <dje@google.com>
5990
5991 * linux-low.c (linux_join): Skip process lookup.
5992 * spu-low.c (spu_join): Ditto.
5993 * server.c (join_inferiors_callback): Delete.
5994 (process_serial_event): For 'D' packet (detach) call join_inferior
5995 directly.
5996
4d393d60
JM
59972011-05-04 Joseph Myers <joseph@codesourcery.com>
5998
5999 * README: Don't mention xscale*-*-linux*.
6000 * configure.srv (xscale*-*-linux*): Don't handle target.
6001
b00ad6ff
NF
60022011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6003
6004 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6005 casting pointers.
6006 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6007 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6008 (i386_emit_void_call_2): Likewise.
6009
af96c192
YQ
60102011-04-26 Yao Qi <yao@codesourcery.com>
6011
43aaf8b6
PA
6012 * linux-low.c: Move common macros to linux-ptrace.h.
6013 Include linux-ptrace.h.
af96c192
YQ
6014 * Makefile.in (linux_ptrace_h): New.
6015 (linux-low.o): Depends on linux-ptrace.h.
6016
03f2bd59
JK
60172011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6018
6019 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6020 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6021 (remote_prepare): New function with most of the TCP code from ...
6022 (remote_open): ... here. Detect PORT here unconditionally. Move also
6023 setting transport_is_reliable.
6024 * server.c (run_once): New variable.
6025 (gdbserver_usage): Document it.
6026 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6027 the first run if RUN_ONCE.
6028 * server.h (run_once, remote_prepare): New declarations.
6029
7a9dd1b2
TT
60302011-04-19 Tom Tromey <tromey@redhat.com>
6031
6032 * win32-low.c (handle_load_dll): Remove duplicate "the".
6033
81239425
PM
60342011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6035
6036 Remove support for old Cygwin 1.5 versions.
6037 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6038 function to avoid warning.
6039 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6040 warning.
6041
9e0627f1
PM
60422011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6043
6044 * gdbserver/server.h (Macro _): Define it if not available.
6045
588eebee
MS
60462011-03-14 Michael Snyder <msnyder@vmware.com>
6047
348af9f7 6048 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6049
43f70d4c
JB
60502011-03-10 Joel Brobecker <brobecker@adacore.com>
6051
6052 * Makefile.in (maintainer-clean realclean distclean): Remove
6053 "make ... subdir_do" command.
6054
348af9f7
MS
60552011-03-10 Michael Snyder <msnyder@vmware.com>
6056
6057 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6058
6059 * server.c (handle_v_run): Free alloced buffer on early return.
6060
e637a4f5
YQ
60612011-03-09 Yao Qi <yao@codesourcery.com>
6062
6063 Revert:
6064 2011-03-04 Yao Qi <yao@codesourcery.com>
6065
6066 * Makefile.in: Remove GNU make feature --directory.
6067
6068 2011-03-05 Yao Qi <yao@codesourcery.com>
6069
6070 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6071 (subdir_do): New make target. Copied from gdb/Makefile.
6072 (maintainer-clean, realclean, distclean, clean): Call corresponding
6073 make targets in common/Makefile.
6074
6075 2011-02-11 Yao Qi <yao@codesourcery.com>
6076
6077 * configure.ac: Call AC_PROG_RANLIB.
6078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6079 * configure: Regenerate.
6080
e6edda56
JK
60812011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6082
6083 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6084
e5141119
JB
60852011-03-06 Yao Qi <yao@codesourcery.com>
6086
6087 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6088
64794aa4
JB
60892011-03-05 Yao Qi <yao@codesourcery.com>
6090
6091 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6092 (subdir_do): New make target. Copied from gdb/Makefile.
6093 (maintainer-clean, realclean, distclean, clean): Call corresponding
6094 make targets in common/Makefile.
6095
7a762829
YQ
60962011-03-04 Yao Qi <yao@codesourcery.com>
6097
6098 * Makefile.in: Remove GNU make feature --directory.
6099
348af9f7
MS
61002011-03-04 Michael Snyder <msnyder@vmware.com>
6101
6102 * server.c (queue_stop_reply): Call xmalloc not malloc.
6103
61042011-03-02 Michael Snyder <msnyder@vmware.com>
6105
6106 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6107
9f72fee2
MS
61082011-02-28 Michael Snyder <msnyder@vmware.com>
6109
588eebee
MS
6110 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6111 (cmd_qtframe): Ditto.
6112 (cmd_qtbuffer): Ditto.
6113 (cmd_bigqtbuffer): Ditto.
6114
9f72fee2
MS
6115 * utils.c (decimal2str): Initialize 'width' to nine, then
6116 don't mess with it.
6117
8040bd49
UW
61182011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6119
6120 * hostio.c (require_data): Free *data, not data.
6121
7e52cbd0
JK
61222011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6123
6124 * hostio.c (require_data): Use free, not xfree.
6125
9130f83e
MS
61262011-02-27 Michael Snyder <msnyder@vmware.com>
6127
4b812f4e
MS
6128 * server.c (handle_query): Discard unused value.
6129
9130f83e
MS
6130 * hostio.c (require_data): Free malloc memory before returning
6131 error.
6132
69d37113
MS
61332011-02-26 Michael Snyder <msnyder@vmware.com>
6134
6135 * linux-low.c (list_threads): Call closedir for dirent.
6136
35f5825a
MS
61372011-02-27 Michael Snyder <msnyder@vmware.com>
6138
2a589cef
MS
6139 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6140 a case statement falls through.
6141
0adea5f7
MS
6142 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6143
35f5825a
MS
6144 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6145 in comparison.
6146
238f1c74
MS
61472011-02-26 Michael Snyder <msnyder@vmware.com>
6148
6149 * utils.c (decimal2str): Eliminate dead code and dead param.
6150 (pulongest): Drop dead param from call to decimal2str.
6151 (plongest): Ditto.
6152
633ff500
JB
61532011-02-24 Joel Brobecker <brobecker@adacore.com>
6154
6155 Revert the following patch (not approved yet):
6156 2011-02-21 Hui Zhu <teawater@gmail.com>
6157 * tracepoint.c (tp_printf): New function.
6158 (eval_agent_expr): Handle gdb_agent_op_printf.
6159
f9c6ff72
HZ
61602011-02-21 Hui Zhu <teawater@gmail.com>
6161
6162 * tracepoint.c (tp_printf): New function.
6163 (eval_agent_expr): Handle gdb_agent_op_printf.
6164
94d5e490
TT
61652011-02-18 Tom Tromey <tromey@redhat.com>
6166
6167 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6168 (tracepoint.o): Likewise.
6169 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6170 (gdb_agent_op_names): Likewise.
6171
c7f96d2b
TT
61722011-02-18 Tom Tromey <tromey@redhat.com>
6173
6174 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6175 gdb_agent_op_rot>: New constants.
6176 (gdb_agent_op_names): Add pick and roll.
6177 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6178 cases.
6179
0feedb2c
JK
61802011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6181
6182 * aclocal.m4: Regenerated with aclocal-1.11.1.
6183
b3b9301e
PA
61842011-02-14 Pedro Alves <pedro@codesourcery.com>
6185
6186 * server.c (handle_qxfer_traceframe_info): New.
6187 (qxfer_packets): Register "traceframe-info".
6188 (handle_query): Report support for qXfer:traceframe-info:read+.
6189 * tracepoint.c (match_blocktype): New.
6190 (traceframe_find_block_type): Rename to ...
6191 (traceframe_walk_blocks): ... this. Add callback filter argument,
6192 and use it.
6193 (traceframe_find_block_type): New, reimplemented on top of
6194 traceframe_walk_blocks.
6195 (build_traceframe_info_xml): New.
6196 (traceframe_read_info): New.
6197 * server.h (traceframe_read_info): Declare.
6198
4f3e6fb7
YQ
61992011-02-11 Yao Qi <yao@codesourcery.com>
6200
6201 * configure.ac: Call AC_PROG_RANLIB.
6202 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6203 * configure: Regenerate.
6204
764880b7
PA
62052011-02-07 Pedro Alves <pedro@codesourcery.com>
6206
6207 * server.c (gdb_read_memory): Change return semantics to allow
6208 partial transfers.
6209 (handle_search_memory_1): Adjust.
6210 (process_serial_event) <'m' packet>: Handle partial transfers.
6211 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6212
1c79eb8a
PA
62132011-01-28 Pedro Alves <pedro@codesourcery.com>
6214
6215 * regcache.c (init_register_cache): Initialize
6216 regcache->register_status.
6217 (free_register_cache): Release regcache->register_status.
6218 (regcache_cpy): Copy register_status.
6219 (registers_to_string): Print 'x's for unavailable registers.
6220 (supply_register): Mark the register's status valid or
6221 unavailable, depending on whether a buffer was passed in or not.
6222 (supply_register_zeroed): New.
6223 (supply_regblock): Mark the registers' status valid or
6224 unavailable, depending on whether a buffer was passed in or not.
6225 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6226 (struct regcache): New `register_status' field.
6227 (supply_register_zeroed): Declare.
6228 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6229 supply_register_zeroed, rather than passing a NULL buffer to
6230 supply_register.
6231 * tracepoint.c (fetch_traceframe_registers): Update comment.
6232
85724a0e
PA
62332011-01-28 Pedro Alves <pedro@codesourcery.com>
6234
6235 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6236 buffer explicit.
6237
d08aafef
PA
62382011-01-25 Pedro Alves <pedro@codesourcery.com>
6239
6240 * server.h (decode_xfer_write): Change prototype.
6241 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6242 and don't extract the annex here.
6243 * server.c (decode_xfer_read): Remove `annex' parameter,
6244 and don't extract the annex here.
6245 (decode_xfer): New.
6246 (struct qxfer): New.
6247 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6248 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6249 (handle_qxfer_statictrace): New functions, abstracted out from
6250 handle_query, and made to use the struct qxfer interface.
6251 (handle_threads_qxfer_proper): Rename to ...
6252 (handle_qxfer_threads_proper): ... this.
6253 (handle_threads_qxfer): Rename to ...
6254 (handle_qxfer_threads): ... this. Adjust.
6255 (qxfer_packets): New array.
6256 (handle_qxfer): New function.
6257 (handle_query): Use handle_qxfer.
6258
493e2a69
MS
62592011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6260
6261 * gdbreplay.c: Shorten lines of >= 80 columns.
6262 * linux-low.c: Ditto.
6263 * linux-ppc-low.c: Ditto.
6264 * linux-s390-low.c: Ditto.
6265 * linux-sparc-low.c: Ditto.
6266 * linux-x86-low.c: Ditto.
6267 * linux-xtensa-low.c: Ditto.
6268 * mem-break.c: Ditto.
6269 * nto-low.c: Ditto.
6270 * regcache.h: Ditto.
6271 * remote-utils.c: Ditto.
6272 * server.c: Ditto.
6273 * server.h: Ditto.
6274 * thread-db.c: Ditto.
6275 * tracepoint.c: Ditto.
6276 * utils.c: Ditto.
6277 * win32-low.h: Ditto.
6278
44944448
JB
62792011-01-05 Joel Brobecker <brobecker@adacore.com>
6280
6281 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6282 update.
6283
71ce852c
JB
62842011-01-01 Joel Brobecker <brobecker@adacore.com>
6285
6286 * server.c (gdbserver_version): Update copyright year in version
6287 output.
6288 * gdbreplay.c (gdbreplay_version): Ditto.
6289
eb826dc6
MF
62902010-12-29 Jie Zhang <jie.zhang@analog.com>
6291
6292 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6293 * linux-bfin-low.c: New file.
6294 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6295 PT_DATA_ADDR for BFIN targets.
6296 * Makefile.in (SFILES): Add linux-bfin-low.c.
6297 (clean): Remove reg-bfin.c.
6298 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6299 * README: Mention supported Blackfin targets.
6300
39ab222a
MF
63012010-12-23 Mike Frysinger <vapier@gentoo.org>
6302
6303 * .gitignore: New file.
6304
a1f2ce7d
MF
63052010-11-16 Mike Frysinger <vapier@gentoo.org>
6306
6307 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6308
f474844c
JZ
63092010-10-22 Jie Zhang <jie@codesourcery.com>
6310
6311 * Makefile.in: Add FLAGS_TO_PASS variable.
6312 (install): Remove dependency of install-only and recursively
6313 invoke make for install-only.
6314
f1048712
DE
63152010-10-04 Doug Evans <dje@google.com>
6316
6317 * Makefile.in (uninstall): Use $(DESTDIR).
6318
b53a1623
PA
63192010-09-24 Pedro Alves <pedro@codesourcery.com>
6320
e6ee044d
PA
6321 PR gdb/11842
6322
b53a1623
PA
6323 * linux-x86-low.c (compat_siginfo_from_siginfo)
6324 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6325 si_code is < 0. Check for si_code == SI_TIMER before checking for
6326 si_code < 0.
6327
fa1bd1e4
JB
63282010-09-13 Joel Brobecker <brobecker@adacore.com>
6329
6330 * lynx-i386-low.c: New file.
6331 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6332
47fac8f8
JB
63332010-09-13 Joel Brobecker <brobecker@adacore.com>
6334
6335 * lynx-low.c (ptrace_request_to_str): Remove handling for
6336 request values that have been removed in LynxOS 5.x.
6337
1adfc54d
JB
63382010-09-13 Joel Brobecker <brobecker@adacore.com>
6339
6340 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6341 <ptrace.h>
6342
c2a66c29
NS
63432010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6344
6345 * configure.ac: Add --enable-inprocess-agent option.
6346 * configure: Rebuilt.
6347
32fcada3
YQ
63482010-09-06 Yao Qi <yao@codesourcery.com>
6349
6350 * linux-low.c (linux_kill): Remove unused variable.
6351 (linux_stabilize_threads): Likewise.
6352 * server.c (start_inferior): Likewise.
6353 (queue_stop_reply_callback): Likewise.
6354 * tracepoint.c (do_action_at_tracepoint): Likewise.
6355
0cccb683
YQ
63562010-09-06 Yao Qi <yao@codesourcery.com>
6357
6358 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6359 on return.
6360
423ec54c
JK
63612010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6362
6363 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6364
12ac6819
PA
63652010-09-06 Pedro Alves <pedro@codesourcery.com>
6366
6367 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6368 "$(IPA_DEPFILES)".
6369
8ed54b31
JB
63702010-09-01 Joel Brobecker <brobecker@adacore.com>
6371
6372 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6373 gdbserver/lynx-ppc-low.c: New files.
6374 * Makefile.in (lynx_low_h): New variable.
6375 (lynx-low.o, lynx-ppc-low.o): New rules.
6376 * configure.ac: On LynxOS, link with -lnetinet.
6377 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6378 * configure: regenerate.
6379
bb0116a4
JB
63802010-09-01 Joel Brobecker <brobecker@adacore.com>
6381
6382 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6383 * configure.ac: Add check for vasprintf and vsnprintf.
6384 * configure, config.in: Regenerate.
6385 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6386
a778ab81 63872010-09-01 Joel Brobecker <brobecker@adacore.com>
6388
6389 * gdbreplay.c: Move include of alloca.h up, next to include of
6390 malloc.h.
6391 * server.h: Add include of malloc.h.
6392 * mem-break.c: Remove include of malloc.h.
6393 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6394
8b034a19 63952010-09-01 Joel Brobecker <brobecker@adacore.com>
6396
6397 * Makefile.in (memmem.o): Build with -Wno-error.
6398
63992010-09-01 Joel Brobecker <brobecker@adacore.com>
6400
6401 * utils.c (xsnprintf): Make non-static.
6402 * server.h: Add xsnprintf declaration.
6403 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6404 replace calls to snprintf by calls to xsnprintf throughout.
6405
64062010-09-01 Joel Brobecker <brobecker@adacore.com>
6407
6408 * configure.ac: Add configure check for alloca.
6409 * configure, config.in: Regenerate.
6410 * server.h: Include alloca.h if it exists.
6411 * gdbreplay.c: Include alloca.h if it exists.
6412
1a981360
PA
64132010-08-28 Pedro Alves <pedro@codesourcery.com>
6414
6415 * linux-low.c (__SIGRTMIN): Define if not already defined.
6416 (linux_create_inferior): Check for __ANDROID__ rather than
6417 __SIGRTMIN.
6418 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6419 are already deferred.
6420 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6421 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6422 stopped and already has a pending signal to report.
6423 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6424 a pending signal to report or is moving out of a jump pad.
6425 (linux_init_signals): Check for __ANDROID__ rather than
6426 __SIGRTMIN.
6427
b4d51a55
PA
64282010-08-28 Pedro Alves <pedro@codesourcery.com>
6429
6430 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6431 debug_threads check. Avoid a linear search when not doing debug
6432 output.
6433
ec48365d
PA
64342010-08-27 Pedro Alves <pedro@codesourcery.com>
6435
6436 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6437 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6438 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6439 (process_event): Change local fd's type to gdb_fildes_t.
6440 (create_file_handler): Adjust prototype.
6441 (delete_file_handler): Adjust prototype.
6442 (handle_file_event): Adjust prototype. Use pfildes.
6443 (create_file_event): Adjsut prototype.
6444 * remote-utils.c (remote_desc, listen_desc): Change type to
6445 gdb_fildes_t.
6446 * server.h: New gdb_fildes_t typedef.
6447 [USE_WIN32API]: Include winsock2.h.
6448 (delete_file_handler, add_file_handler): Adjust prototypes.
6449 (pfildes): Declare.
6450 * utils.c (pfildes): New.
6451
854d88f0
PA
64522010-08-27 Pedro Alves <pedro@codesourcery.com>
6453
6454 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6455 * configure: Regenerate.
6456
0146f85b
PA
64572010-08-27 Pedro Alves <pedro@codesourcery.com>
6458
6459 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6460 (linux_done_accessing_memory): ... this.
6461 (linux_target_ops): Adjust.
6462 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6463 * nto-low.c (nto_target_ops): Adjust comment.
6464 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6465 * spu-low.c (spu_target_ops): Adjust comment.
6466 * target.h (target_ops): Rename unprepare_to_access_memory field
6467 to done_accessing_memory.
6468 (unprepare_to_access_memory): Rename to ...
6469 (done_accessing_memory): ... this.
6470
90d74c30
PA
64712010-08-26 Pedro Alves <pedro@codesourcery.com>
6472
6473 * linux-low.c (linux_prepare_to_access_memory): New.
6474 (linux_unprepare_to_access_memory): New.
6475 (linux_target_ops): Install them.
6476 * server.c (read_memory): Rename to ...
6477 (gdb_read_memory): ... this. Use
6478 prepare_to_access_memory/prepare_to_access_memory.
6479 (write_memory): Rename to ...
6480 (gdb_write_memory): ... this. Use
6481 prepare_to_access_memory/prepare_to_access_memory.
6482 (handle_search_memory_1): Adjust.
6483 (process_serial_event): Adjust.
6484 * target.h (struct target_ops): New fields
6485 prepare_to_access_memory and unprepare_to_access_memory.
6486 (prepare_to_access_memory, unprepare_to_access_memory): New.
6487 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6488 prepare_to_access_memory/prepare_to_access_memory.
6489 * nto-low.c (nto_target_ops): Adjust.
6490 * spu-low.c (spu_target_ops): Adjust.
6491 * win32-low.c (win32_target_ops): Adjust.
6492
fd467969
PA
64932010-08-26 Pedro Alves <pedro@codesourcery.com>
6494
6495 * Makefile.in (WARN_CFLAGS): Get it from configure.
6496 (WERROR_CFLAGS): New.
6497 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6498 * configure.ac: Introduce --enable-werror, which adds -Werror to
6499 the compiler command line. Enabled by default. Disable with
6500 --disable-werror. Add -Wdeclaration-after-statement
6501 Wpointer-arith and -Wformat-nonliteral to warning flags.
6502 * configure: Regenerate.
6503
331e2f5f
PA
65042010-08-26 Pedro Alves <pedro@codesourcery.com>
6505
6506 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6507
e581f2b4
PA
65082010-08-26 Pedro Alves <pedro@codesourcery.com>
6509
6510 * gdbreplay.c (remote_error): New.
6511 (gdbchar): New.
6512 (expect): Use gdbchar. Check for error reading from GDB.
6513 Clarify sync error output.
6514 (play): Check for errors writing to GDB.
6515 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6516 * remote-utils.c (getpkt): Check for errors writing to the remote
6517 descriptor.
6518
3c11dd79
PA
65192010-08-25 Pedro Alves <pedro@codesourcery.com>
6520
6521 * linux-low.c (linux_wait_1): Move non-debugging code out of
6522 `debug_threads' control.
6523
d20a8ad9
PA
65242010-08-25 Pedro Alves <pedro@codesourcery.com>
6525
6526 * linux-low.c (linux_wait_1): Don't set last_status here.
6527 * server.c (push_event, queue_stop_reply_callback): Assert we're
6528 not pushing a TARGET_WAITKIND_IGNORE event.
6529 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6530 (myresume, handle_target_event): Set the thread's last_resume_kind
6531 and last_status from the target returned status.
6532
964e4306
PA
65332010-08-25 Pedro Alves <pedro@codesourcery.com>
6534
6535 PR threads/10729
6536
6537 * linux-x86-low.c (update_debug_registers_callback): New.
6538 (i386_dr_low_set_addr): Use it.
6539 (i386_dr_low_get_addr): New.
6540 (i386_dr_low_set_control): Use update_debug_registers_callback.
6541 (i386_dr_low_get_control): New.
6542 (i386_dr_low_get_status): Adjust.
6543 * linux-low.c (linux_stop_lwp): New.
6544 * linux-low.h (linux_stop_lwp): Declare.
6545
6546 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6547 argument instead of a i386_debug_reg_state.
6548 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6549 a i386_debug_reg_state.
6550 (i386_insert_aligned_watchpoint): Adjust.
6551 (i386_remove_aligned_watchpoint): Adjust.
6552 (i386_low_stopped_data_address): Read the debug registers from the
6553 inferior instead of from the mirrors.
6554 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6555 (i386_dr_low_get_addr): Declare.
6556 (i386_dr_low_get_control): Declare.
6557 (i386_dr_low_get_status): Change prototype.
6558
6559 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6560 (i386_dr_low_get_addr): New.
6561 (i386_dr_low_get_control): New.
6562 (i386_dr_low_get_status): Adjust prototype. Return
6563 dr_status_mirror.
6564 (i386_initial_stuff): Clear dr_status_mirror and
6565 dr_control_mirror.
6566 (i386_get_thread_context): Adjust.
6567 (i386_set_thread_context): Adjust.
6568 (i386_thread_added): Adjust.
6569
5f21a75b
PA
65702010-08-24 Pedro Alves <pedro@codesourcery.com>
6571
6572 * linux-low.h (linux_thread_area): Delete declaration.
6573
3e4c1235
TS
65742010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6575
6576 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6577 after its termination.
6578
1971b033
PA
65792010-08-09 Pedro Alves <pedro@codesourcery.com>
6580
6581 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6582 (gdb_wants_all_stopped): Delete.
6583 (linux_wait_1): Don't call them.
6584 * server.c (handle_v_cont): Tag all threads as want-stopped.
6585 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6586 stopped as "client-wants-stopped".
6587
310444ac
PA
65882010-07-31 Pedro Alves <pedro@codesourcery.com>
6589
6590 * Makefile.in (signals_h): New.
6591 (server_h): Depend on it.
6592 (server.o): Don't depend on $(signals_def).
6593 (signals.o): Depend on $(signals_def).
6594
a19cae16
JK
65952010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6596
6597 * Makefile.in (signals_def): New.
6598 (server_h): Append include/gdb/signals.h and signals_def.
6599 (server.o): Append signals_def.
6600
30d50328
JK
66012010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6602
6603 * server.c (handle_target_event): Use target_signal_to_host for
6604 resume_info.sig initialization.
6605 * target.h (struct thread_resume) <sig>: New comment.
6606
5c3216e2
OS
66072010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6608
c6f46ca0
OS
6609 * server.c (handle_query): strcpy() the returned string from paddress()
6610 instead of sprintf().
5c3216e2
OS
6611 * utils.c (paddress): Return phex_nz().
6612
6bd31874
JB
66132010-07-07 Joel Brobecker <brobecker@adacore.com>
6614
6615 * server.c (handle_v_cont): Call mourn_inferior if process
6616 just exited.
6617 (myresume): Likewise.
6618
0fb4aa4b
PA
66192010-07-01 Pedro Alves <pedro@codesourcery.com>
6620
6621 Static tracepoints, and integration with UST.
6622
6623 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6624 * mem-break.c (uninsert_all_breakpoints)
6625 (reinsert_all_breakpoints): New.
6626 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6627 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6628 (gdb_agent_ust_loaded, helper_thread_id)
6629 (gdb_agent_helper_thread_id): New macros.
6630 (struct ipa_sym_addresses): Add addr_ust_loaded,
6631 addr_helper_thread_id, addr_cmd_buf.
6632 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6633 (in_process_agent_loaded_ust): New.
6634 (write_e_ust_not_loaded): New.
6635 (maybe_write_ipa_ust_not_loaded): New.
6636 (struct collect_static_trace_data_action): New.
6637 (enum tracepoint_type) <static_tracepoint>: New.
6638 (struct tracepoint) <handle>: Mention static tracepoints.
6639 (struct static_tracepoint_ctx): New.
6640 (CMD_BUF_SIZE): New.
6641 (add_tracepoint_action): Handle static tracepoint actions.
6642 (unprobe_marker_at): New.
6643 (clear_installed_tracepoints): Handle static tracepoints.
6644 (cmd_qtdp): Handle static tracepoints.
6645 (probe_marker_at): New.
6646 (cmd_qtstart): Handle static tracepoints.
6647 (response_tracepoint): Handle static tracepoints.
6648 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6649 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6650 (get_context_regcache): Handle static tracepoints.
6651 (do_action_at_tracepoint): Handle static tracepoint actions.
6652 (traceframe_find_block_type): Handle static trace data blocks.
6653 (traceframe_read_sdata): New.
6654 (download_tracepoints): Download static tracepoint actions.
6655 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6656 (GDB_PROBE_NAME): New.
6657 (ust_ops): New.
6658 (GET_UST_SYM): New.
6659 (USTF): New.
6660 (dlsym_ust): New.
6661 (ust_marker_to_static_tracepoint): New.
6662 (gdb_probe): New.
6663 (collect_ust_data_at_tracepoint): New.
6664 (gdb_ust_probe): New.
6665 (UNIX_PATH_MAX, SOCK_DIR): New.
6666 (gdb_ust_connect_sync_socket): New.
6667 (resume_thread, stop_thread): New.
6668 (run_inferior_command): New.
6669 (init_named_socket): New.
6670 (gdb_ust_socket_init): New.
6671 (cstr_to_hexstr): New.
6672 (next_st): New.
6673 (first_marker, next_marker): New.
6674 (response_ust_marker): New.
6675 (cmd_qtfstm, cmd_qtsstm): New.
6676 (unprobe_marker_at, probe_marker_at): New.
6677 (cmd_qtstmat, gdb_ust_thread): New.
6678 (gdb_ust_init): New.
6679 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6680 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6681 (ST_REGENTRY): New.
6682 (x86_64_st_collect_regmap): New.
6683 (X86_64_NUM_ST_COLLECT_GREGS): New.
6684 (AMD64_RIP_REGNUM): New.
6685 (supply_static_tracepoint_registers): New.
6686 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6687 (ST_REGENTRY): New.
6688 (i386_st_collect_regmap): New.
6689 (i386_NUM_ST_COLLECT_GREGS): New.
6690 (supply_static_tracepoint_registers): New.
6691 * server.c (handle_query): Handle qXfer:statictrace:read.
6692 <qSupported>: Report support for StaticTracepoints, and
6693 qXfer:statictrace:read features.
6694 * server.h (traceframe_read_sdata)
6695 (supply_static_tracepoint_registers): Declare.
6696 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6697 (unpack_varlen_hex): Include in IPA build.
6698 * Makefile.in (ustlibs, ustinc): New.
6699 (IPA_OBJS): Add remote-utils-ipa.o.
6700 ($(IPA_LIB)): Link -ldl and -lpthread.
6701 (UST_CFLAGS): New.
6702 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6703 * config.in, configure: Regenerate.
6704
9e4344e5
PA
67052010-06-20 Ian Lance Taylor <iant@google.com>
6706 Pedro Alves <pedro@codesourcery.com>
6707
6708 * linux-x86-low.c (always_true): Delete.
6709 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6710 trying to fool the compiler with always_true.
6711
c6beb2cb
PA
67122010-06-20 Pedro Alves <pedro@codesourcery.com>
6713
6714 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6715 conditions in gdbserver.
6716
d2ed6730
UW
67172010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6718
6719 * spu-low.c (spu_read_memory): Wrap around local store limit.
6720 (spu_write_memory): Likewise.
6721
4e29fb54
PA
67222010-06-15 Pedro Alves <pedro@codesourcery.com>
6723
6724 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6725 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6726 LONGEST uses.
6727 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6728 uses.
6729 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6730 uses with LONGEST uses.
6731
6a271cae
PA
67322010-06-14 Stan Shebs <stan@codesourcery.com>
6733 Pedro Alves <pedro@codesourcery.com>
6734
6735 Bytecode compiler.
6736
6737 * linux-x86-low.c: Include limits.h.
6738 (add_insns): New.
6739 (always_true): New.
6740 (EMIT_ASM): New.
6741 (EMIT_ASM32): New.
6742 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6743 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6744 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6745 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6746 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6747 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6748 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6749 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6750 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6751 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6752 (amd64_emit_void_call_2): New.
6753 (amd64_emit_ops): New.
6754 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6755 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6756 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6757 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6758 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6759 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6760 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6761 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6762 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6763 (i386_emit_stack_adjust, i386_emit_int_call_1)
6764 (i386_emit_void_call_2): New.
6765 (i386_emit_ops): New.
6766 (x86_emit_ops): New.
6767 (the_low_target): Install x86_emit_ops.
6768 * server.h (struct emit_ops): New.
6769 (get_raw_reg_func_addr): Declare.
6770 (current_insn_ptr, emit_error): Declare.
6771 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6772 (set_trace_state_variable_value): New defines.
6773 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6774 addr_get_trace_state_variable_value and
6775 addr_set_trace_state_variable_value.
6776 (symbol_list): New fields for get_raw_reg,
6777 get_trace_state_variable_value and set_trace_state_variable_value.
6778 (condfn): New typedef.
6779 (struct tracepoint): New field `compiled_cond'.
6780 (do_action_at_tracepoint): Clear compiled_cond.
6781 (get_trace_state_variable_value, set_trace_state_variable_value):
6782 Export in the IPA.
6783 (condition_true_at_tracepoint): If there's a compiled condition,
6784 run that.
6785 (current_insn_ptr, emit_error): New globals.
6786 (struct bytecode_address): New.
6787 (get_raw_reg_func_addr): New.
6788 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6789 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6790 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6791 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6792 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6793 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6794 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6795 (compile_tracepoint_condition, compile_bytecodes): New.
6796 * target.h (emit_ops): Forward declare.
6797 (struct target_ops): New field emit_ops.
6798 (target_emit_ops): New.
6799 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6800 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6801 * linux-low.c (linux_emit_ops): New.
6802 (linux_target_ops): Install it.
6803 * linux-low.h (struct linux_target_ops): New field emit_ops.
6804
92b72907
UW
68052010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6806
6807 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6808 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6809
fa593d66
PA
68102010-06-01 Pedro Alves <pedro@codesourcery.com>
6811 Stan Shebs <stan@codesourcery.com>
6812
6813 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6814 (all): Depend on $(extra_libraries).
6815 (install-only): Install the IPA.
6816 (IPA_OBJS, IPA_LIB): New.
6817 (clean): Remove the IPA lib.
6818 (IPAGENT_CFLAGS): New.
6819 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6820 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6821 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6822 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6823 * configure.ac: Check for atomic builtins support in the compiler.
6824 (IPA_DEPFILES, extra_libraries): Define.
6825 * configure.srv (ipa_obj): Add description.
6826 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6827 (i[34567]86-*-linux*): Set ipa_obj.
6828 (x86_64-*-linux*): Set ipa_obj.
6829 * linux-low.c (stabilizing_threads): New.
6830 (supports_fast_tracepoints): New.
6831 (linux_detach): Stabilize threads before detaching.
6832 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6833 the lwp is either not stabilizing, or is moving out of a jump pad.
6834 (linux_fast_tracepoint_collecting): New.
6835 (maybe_move_out_of_jump_pad): New.
6836 (enqueue_one_deferred_signal): New.
6837 (dequeue_one_deferred_signal): New.
6838 (linux_wait_for_event_1): If moving out of a jump pad, defer
6839 pending signals to later.
6840 (linux_stabilize_threads): New.
6841 (linux_wait_1): Check if threads need moving out of jump pads, and
6842 do it if so.
6843 (stuck_in_jump_pad_callback): New.
6844 (move_out_of_jump_pad_callback): New.
6845 (lwp_running): New.
6846 (linux_resume_one_lwp): Handle moving out of jump pads.
6847 (linux_set_resume_request): Dequeue deferred signals.
6848 (need_step_over_p): Also step over fast tracepoint jumps.
6849 (start_step_over): Also uninsert fast tracepoint jumps.
6850 (finish_step_over): Also reinsert fast tracepoint jumps.
6851 (linux_install_fast_tracepoint_jump): New.
6852 (linux_target_ops): Install linux_stabilize_threads and
6853 linux_install_fast_tracepoint_jump_pad.
6854 * linux-low.h (linux_target_ops) <get_thread_area,
6855 install_fast_tracepoint_jump_pad>: New fields.
6856 (struct lwp_info) <collecting_fast_tracepoint,
6857 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6858 (linux_get_thread_area): Declare.
6859 * linux-x86-low.c (jump_insn): New.
6860 (x86_get_thread_area): New.
6861 (append_insns): New.
6862 (push_opcode): New.
6863 (amd64_install_fast_tracepoint_jump_pad): New.
6864 (i386_install_fast_tracepoint_jump_pad): New.
6865 (x86_install_fast_tracepoint_jump_pad): New.
6866 (the_low_target): Install x86_get_thread_area and
6867 x86_install_fast_tracepoint_jump_pad.
6868 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6869 (struct fast_tracepoint_jump): New.
6870 (fast_tracepoint_jump_insn): New.
6871 (fast_tracepoint_jump_shadow): New.
6872 (find_fast_tracepoint_jump_at): New.
6873 (fast_tracepoint_jump_here): New.
6874 (delete_fast_tracepoint_jump): New.
6875 (set_fast_tracepoint_jump): New.
6876 (uninsert_fast_tracepoint_jumps_at): New.
6877 (reinsert_fast_tracepoint_jumps_at): New.
6878 (set_breakpoint_at): Use write_inferior_memory.
6879 (uninsert_raw_breakpoint): Use write_inferior_memory.
6880 (check_mem_read): Mask out fast tracepoint jumps.
6881 (check_mem_write): Mask out fast tracepoint jumps.
6882 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6883 (set_fast_tracepoint_jump): Declare.
6884 (delete_fast_tracepoint_jump)
6885 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6886 (reinsert_fast_tracepoint_jumps_at): Declare.
6887 * regcache.c: Don't compile many functions when building the
6888 in-process agent library.
6889 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6890 the register buffer in the heap.
6891 (free_register_cache): If the register buffer isn't owned by the
6892 regcache, don't free it.
6893 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6894 pre-existing register caches.
6895 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6896 type.
6897 (convert_ascii_to_int): : Constify `from' parameter type.
6898 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6899 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6900 the needed buffer in-place.
6901 (relocate_instruction): New.
6902 * server.c (handle_query) <qSymbols>: If the target supports
6903 tracepoints, give it a chance of looking up symbols. Report
6904 support for fast tracepoints.
6905 (handle_status): Stabilize threads.
6906 (process_serial_event): Adjust.
6907 * server.h (struct fast_tracepoint_jump): Forward declare.
6908 (struct process_info) <fast_tracepoint_jumps>: New field.
6909 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6910 (decode_X_packet, decode_M_packet): Adjust.
6911 (relocate_instruction): Declare.
6912 (in_process_agent_loaded): Declare.
6913 (tracepoint_look_up_symbols): Declare.
6914 (struct fast_tpoint_collect_status): Declare.
6915 (fast_tracepoint_collecting): Declare.
6916 (force_unlock_trace_buffer): Declare.
6917 (handle_tracepoint_bkpts): Declare.
6918 (initialize_low_tracepoint)
6919 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6920 * target.h (struct target_ops) <stabilize_threads,
6921 install_fast_tracepoint_jump_pad>: New fields.
6922 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6923 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6924 [HAVE_STDINT_H]: Include stdint.h.
6925 (trace_debug_1): Rename to ...
6926 (trace_vdebug): ... this.
6927 (trace_debug): Rename to ...
6928 (trace_debug_1): ... this. Add `level' parameter.
6929 (trace_debug): New.
6930 (ATTR_USED, ATTR_NOINLINE): New.
6931 (IP_AGENT_EXPORT): New.
6932 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6933 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6934 (about_to_request_buffer_space, trace_buffer_is_full)
6935 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6936 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6937 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6938 (traceframe_write_count, traceframes_created)
6939 (trace_state_variables)
6940 New renaming defines.
6941 (struct ipa_sym_addresses): New.
6942 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6943 (symbol_list): New.
6944 (ipa_sym_addrs): New.
6945 (all_tracepoint_symbols_looked_up): New.
6946 (in_process_agent_loaded): New.
6947 (write_e_ipa_not_loaded): New.
6948 (maybe_write_ipa_not_loaded): New.
6949 (tracepoint_look_up_symbols): New.
6950 (debug_threads) [IN_PROCESS_AGENT]: New.
6951 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6952 (UNKNOWN_SIDE_EFFECTS): New.
6953 (stop_tracing): New.
6954 (flush_trace_buffer): New.
6955 (stop_tracing_bkpt): New.
6956 (flush_trace_buffer_bkpt): New.
6957 (read_inferior_integer): New.
6958 (read_inferior_uinteger): New.
6959 (read_inferior_data_pointer): New.
6960 (write_inferior_data_pointer): New.
6961 (write_inferior_integer): New.
6962 (write_inferior_uinteger): New.
6963 (struct collect_static_trace_data_action): Delete.
6964 (enum tracepoint_type): New.
6965 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6966 <actions_str, step_actions, step_actions_str>: Only include in
6967 GDBserver.
fa593d66
PA
6968 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6969 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6970 (tracepoints): Use IP_AGENT_EXPORT.
6971 (last_tracepoint): Don't include in the IPA.
6972 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6973 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6974 (alloced_trace_state_variables): New.
6975 (trace_state_variables): Use IP_AGENT_EXPORT.
6976 (traceframe_t): Delete unused variable.
6977 (circular_trace_buffer): Don't include in the IPA.
6978 (trace_buffer_start): Delete.
6979 (struct trace_buffer_control): New.
6980 (trace_buffer_free): Delete.
6981 (struct ipa_trace_buffer_control): New.
6982 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6983 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6984 New.
6985 (trace_buffer_ctrl): New.
6986 (TRACE_BUFFER_CTRL_CURR): New.
6987 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6988 Reimplement as macros.
6989 (trace_buffer_wrap): Delete.
6990 (traceframe_write_count, traceframe_read_count)
6991 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6992 (struct tracepoint_hit_ctx) <type>: New field.
6993 (struct fast_tracepoint_ctx): New.
6994 (memory_barrier): New.
6995 (cmpxchg): New.
6996 (record_tracepoint_error): Update atomically in the IPA.
6997 (clear_inferior_trace_buffer): New.
6998 (about_to_request_buffer_space): New.
6999 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7000 updating the same buffer.
7001 (add_tracepoint): Default the tracepoint's type to trap
7002 tracepoint, and orig_size to -1.
7003 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7004 internal variables.
7005 (create_trace_state_variable): New parameter `gdb'. Handle it.
7006 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7007 (cmd_qtdp): Handle fast tracepoints.
7008 (cmd_qtdv): Adjust.
7009 (max_jump_pad_size): New.
7010 (gdb_jump_pad_head): New.
7011 (get_jump_space_head): New.
7012 (claim_jump_space): New.
7013 (sort_tracepoints): New.
7014 (MAX_JUMP_SIZE): New.
7015 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7016 IPA.
7017 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7018 support. Upload fast traceframes, and delete internal IPA
7019 breakpoints.
7020 (stop_tracing_handler): New.
7021 (flush_trace_buffer_handler): New.
7022 (cmd_qtstop): Upload fast tracepoints.
7023 (response_tracepoint): Handle fast tracepoints.
7024 (tracepoint_finished_step): Upload fast traceframes. Set the
7025 tracepoint hit context's tracepoint type.
7026 (handle_tracepoint_bkpts): New.
7027 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7028 type. Add comment about fast tracepoints.
7029 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7030 non-existing action_str field.
7031 (get_context_regcache): Handle fast tracepoints.
7032 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7033 to the regcache.
7034 (fast_tracepoint_from_jump_pad_address): New.
7035 (fast_tracepoint_from_ipa_tpoint_address): New.
7036 (collecting_t): New.
7037 (force_unlock_trace_buffer): New.
7038 (fast_tracepoint_collecting): New.
7039 (collecting): New.
7040 (gdb_collect): New.
7041 (write_inferior_data_ptr): New.
7042 (target_tp_heap): New.
7043 (target_malloc): New.
7044 (download_agent_expr): New.
7045 (UALIGN): New.
7046 (download_tracepoints): New.
7047 (download_trace_state_variables): New.
7048 (upload_fast_traceframes): New.
7049 (IPA_FIRST_TRACEFRAME): New.
7050 (IPA_NEXT_TRACEFRAME_1): New.
7051 (IPA_NEXT_TRACEFRAME): New.
7052 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7053 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7054 (gdb_jump_pad_buffer_end): New.
7055 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7056 (initialize_tracepoint): Adjust.
7057 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7058 buffer. Initialize the low module.
7059 * utils.c (PREFIX, TOOLNAME): New.
7060 (malloc_failure): Use PREFIX.
7061 (error): In the IPA, an error causes an exit.
7062 (fatal, warning): Use PREFIX.
7063 (internal_error): Use TOOLNAME.
7064 (NUMCELLS): Increase to 10.
7065 * configure, config.in: Regenerate.
7066
d149dd1d
PA
70672010-06-01 Pedro Alves <pedro@codesourcery.com>
7068
7069 * server.c (handle_query) <qSupported>: Do two passes over the
7070 qSupported string to avoid nesting strtok.
7071
f6528abd
JK
70722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7073
7074 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7075 (CDEPS): New.
7076 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7077 -Wl,--dynamic-list.
7078 * configure: Regenerate.
7079 * proc-service.list: New.
7080
ca2a87a0
JK
70812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7082
7083 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7084 New comment.
7085
363a6e9f
OS
70862010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7087
7088 * gdbreplay.c (remote_open): Check error return from socket() call by
7089 its equality to -1 not by it being negative.
7090 * remote-utils.c (remote_open): Likewise.
7091
d23b6cb1
PA
70922010-05-23 Pedro Alves <pedro@codesourcery.com>
7093
7094 * config.h: Regenerate.
7095
28d3cf85
MK
70962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7097
7098 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7099 doesn't provide PTRACE_GET_THREAD_AREA.
7100
fea36a59
MK
71012010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7102
7103 * linux-m68k-low.c: Include <asm/ptrace.h>
7104 (ps_get_thread_area): Implement.
7105
24b066ba
DE
71062010-05-03 Doug Evans <dje@google.com>
7107
7108 * event-loop.c (struct callback_event): New struct.
7109 (callback_list): New global.
7110 (append_callback_event, delete_callback_event): New functions.
7111 (process_callback): New function.
7112 (start_event_loop): Call it.
7113 * remote-utils.c (NOT_SCHEDULED): Define.
7114 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7115 moved out of readchar.
7116 (readchar): Rewrite. Call reschedule before returning.
7117 (reset_readchar): New function.
7118 (remote_close): Call it.
7119 (process_remaining, reschedule): New functions.
7120 * server.h (callback_handler_func): New typedef.
7121 (append_callback_event, delete_callback_event): Declare.
7122
9836d6ea
PA
71232010-05-03 Pedro Alves <pedro@codesourcery.com>
7124
7125 * proc-service.c (ps_pglobal_lookup): Use
7126 thread_db_look_up_one_symbol.
7127 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7128 parameter. Use it instead of all_symbols_looked_up.
7129 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7130 field.
7131 (all_symbols_looked_up): Don't declare.
7132 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7133 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7134 field.
7135 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7136 Set all_symbols_looked_up here.
7137 (thread_db_look_up_one_symbol): New.
7138 (thread_db_get_tls_address): Adjust.
7139 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7140 thread_db object on the heap, and tentatively set it in the
7141 process structure.
7142 (thread_db_init): Don't set all_symbols_looked_up here.
7143 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7144
7984d532
PA
71452010-05-03 Pedro Alves <pedro@codesourcery.com>
7146
7147 * linux-low.c (linux_kill, linux_detach): Adjust.
7148 (status_pending_p_callback): Remove redundant statement. Check
7149 for !TARGET_WAITIKIND_IGNORE, instead of
7150 TARGET_WAITKIND_STOPPED.
7151 (handle_tracepoints): Make sure LWP is locked. Adjust.
7152 (linux_wait_for_event_1): Adjust.
7153 (linux_cancel_breakpoints): New.
7154 (unsuspend_one_lwp): New.
7155 (unsuspend_all_lwps): New.
7156 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7157 (send_sigstop_callback): Change return type to int, add new
7158 `except' parameter and handle it.
7159 (suspend_and_send_sigstop_callback): New.
7160 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7161 pass them down. If SUSPEND, also increment the lwp's suspend
7162 count.
7163 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7164 (need_step_over_p): Don't consider suspended LWPs.
7165 (start_step_over): Adjust.
7166 (proceed_one_lwp): Change return type to int, add new `except'
7167 parameter and handle it.
7168 (unsuspend_and_proceed_one_lwp): New.
7169 (proceed_all_lwps): Use find_inferior instead of
7170 for_each_inferior.
7171 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7172 also decrement the suspend count of LWPs. Pass `except' down,
7173 instead of hacking its suspend count.
7174 (linux_pause_all): Add `freeze' parameter. Adjust.
7175 (linux_unpause_all): New.
7176 (linux_target_ops): Install linux_unpause_all.
7177 * server.c (handle_status): Adjust.
7178 * target.h (struct target_ops): New fields `unpause_all' and
7179 `cancel_breakpoints'. Add new parameter to `pause_all'.
7180 (pause_all): Add new `freeze' parameter.
7181 (unpause_all): New.
7182 (cancel_breakpoints): New.
7183 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7184 cancel breakpoints.
7185 (cmd_qtstart): Pause threads.
7186 (stop_tracing): Pause threads, and cancel breakpoints.
7187 * win32-low.c (win32_target_ops): Adjust.
7188
e471f25b
PA
71892010-05-03 Pedro Alves <pedro@codesourcery.com>
7190
7191 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7192 the inferior right away from here...
7193 (linux_wait_1): ... to here, and adjust to check the thread's
7194 last_resume_kind instead of the lwp's step or stop_expected flags.
7195
1915ef4f
PA
71962010-05-02 Pedro Alves <pedro@codesourcery.com>
7197
7198 * README: Use consistent `GDB' and `GDBserver' spellings.
7199
f9e39928
PA
72002010-05-02 Pedro Alves <pedro@codesourcery.com>
7201
7202 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7203 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7204 (linux_detach_one_lwp): Assume the lwp is stopped.
7205 (any_thread_of): Delete.
7206 (linux_detach): Stop all lwps here. Don't blindly delete all
7207 breakpoints.
7208 (delete_lwp_callback): New.
7209 (linux_mourn): Delete all lwps of the process that is gone.
7210 (linux_wait_1): Don't delete the last lwp of the process here.
7211 * mem-break.h (mark_breakpoints_out): Declare.
7212 * mem-break.c (mark_breakpoints_out): New.
7213 (free_all_breakpoints): Use it.
7214 * server.c (handle_target_event): If the process is gone, mark
7215 breakpoints out.
7216 * thread-db.c (struct thread_db) <create_bp>: New field.
7217 (thread_db_enable_reporting): Fix prototype. Store a thread event
7218 breakpoint reference in the thread_db struct.
7219 (thread_db_load_search): Clear the thread_db object.
7220 (try_thread_db_load_1): Ditto.
7221 (switch_to_process): New.
7222 (disable_thread_event_reporting): Use it.
7223 (remove_thread_event_breakpoints): New.
7224 (thread_db_detach, thread_db_mourn): Use it.
7225
1e7fc18c
PA
72262010-05-01 Pedro Alves <pedro@codesourcery.com>
7227
7228 * linux-low.c (linux_enable_event_reporting): New.
7229 (linux_wait_for_event_1, handle_extended_wait): Use it.
7230
02fc4de7
PA
72312010-04-30 Pedro Alves <pedro@codesourcery.com>
7232
7233 * linux-low.c (linux_kill_one_lwp, linux_kill)
7234 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7235 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7236 SIGSTOP even if the LWP is stopped.
7237 (send_sigstop_callback): New.
7238 (stop_all_lwps): Use send_sigstop_callback instead.
7239 (linux_resume_one_thread): Adjust.
7240 (proceed_one_lwp): Still proceed an LWP that the client has
7241 requested to stop, if we haven't reported it as stopped yet. Make
7242 sure that LWPs the client want stopped, have a pending SIGSTOP.
7243
bc3b5632
DE
72442010-04-26 Doug Evans <dje@google.com>
7245
ae1ada35
DE
7246 * server.c (handle_general_set): Make static.
7247
bc3b5632
DE
7248 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7249 Print received char after testing for error/eof instead of before.
7250 (input_interrupt): Tweak comment.
7251
65730243
DE
72522010-04-23 Doug Evans <dje@google.com>
7253
7254 * server.c (start_inferior): Print inferior argv if --debug.
7255
a8ae7dc0
AR
72562010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7257
7258 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7259 * nto-x86-low.c: Include server.h
7260
1c07cc19
PM
72612010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7262
7263 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7264 be consistent with other sources of this directory.
7265 (init_registers_amd64): Correct name of source file of this function
7266 in the comment.
7267
e0a61e09
PM
72682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7269
7270 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7271 64-bit executables.
7272
54709339
PM
72732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7274
7275 * win32-i386-low.c: Add 64-bit support.
7276 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7277 (init_registers_amd64): Declare.
7278 (mappings): Add 64-bit version of array.
7279 (init_windows_x86): New function.
7280 (the_low_target): Change init_arch field to init_windows_x86.
7281
e8f0053d
PM
72822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7283
7284 * win32-low.c: Adapt to support also 64-bit architecture.
7285 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7286 (get_image_name): Use SIZE_T type for local variable `done'.
7287 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7288 (toolhelp_get_dll_name): Idem.
7289 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7290 Use uintptr_t typecast to avoid warning.
7291 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7292 (handle_exception): Use phex_nz to avoid warning.
7293 (win32_wait): Remove unused local variable `process'.
7294
c481e77e
PM
72952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7296
7297 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7298 `amd64-avx.o'.
7299
12ea4b69
PM
73002010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7301
7302 * configure.ac: Use `ws2_32' library for srv_mingw.
7303 * configure: Regenerate.
7304 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7305 * remote-utils.c: Likewise.
7306
f6d1620c
L
73072010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7308
7309 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7310 if __x86_64__ is defined.
7311
8e642873
PM
73122010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7313
7314 * configure: Regenerate.
7315
711e434b
PM
73162010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7317
7318 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7319 * target.h (target_ops): New get_tib_address field.
7320 * win32-low.h (win32_thread_info): Add thread_local_base field.
7321 * win32-low.c (child_add_thread): Add tlb argument.
7322 Set thread_local_base field to TLB.
7323 (get_child_debug_event): Adapt to child_add_thread change.
7324 (win32_get_tib_address): New function.
7325 (win32_target_ops): Set get_tib_address field to
7326 win32_get_tib_address.
7327 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7328
505106cd
PA
73292010-04-12 Pedro Alves <pedro@codesourcery.com>
7330
505106cd
PA
7331 * linux-low.c (linux_mourn): Also remove the process.
7332 * server.c (handle_target_event): Don't remove the process here.
7333 * nto-low.c (nto_mourn): New.
7334 (nto_target_ops): Install it.
7335 * spu-low.c (spu_mourn): New.
7336 (spu_target_ops): Install it.
7337 * win32-low.c (win32_mourn): New.
7338 (win32_target_ops): Install it.
7339
e8470a06
PA
73402010-04-12 Pedro Alves <pedro@codesourcery.com>
7341
7342 * server.h (buffer_xml_printf): Remove redundant `;'.
7343
45ba0d02
PA
73442010-04-12 Pedro Alves <pedro@codesourcery.com>
7345
7346 * regcache.c (set_register_cache): Invalidate regcaches before
7347 changing the register cache layout.
7348 (regcache_invalidate_one): Allow a NULL regcache.
7349 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7350 regcaches before changing the register cache layout or the target
7351 regsets.
7352
59e04013
L
73532010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7354
7355 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7356 variable warning on Linux/x86-64.
7357
8336d594
PA
73582010-04-11 Pedro Alves <pedro@codesourcery.com>
7359
7360 GDBserver disconnected tracing support.
7361
7362 * linux-low.c (linux_remove_process): Delete.
7363 (add_lwp): Don't set last_resume_kind here.
7364 (linux_kill): Use `mourn'.
7365 (linux_detach): Use `thread_db_detach', and `mourn'.
7366 (linux_mourn): New.
7367 (linux_attach_lwp_1): Adjust comment.
7368 (linux_attach): last_resume_kind moved the thread_info; adjust.
7369 (status_pending_p_callback): Adjust.
7370 (linux_wait_for_event_1): Adjust.
7371 (count_events_callback, select_singlestep_lwp_callback)
7372 (select_event_lwp_callback, cancel_breakpoints_callback)
7373 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7374 (proceed_one_lwp): Adjust.
7375 (linux_async): Add debug output.
7376 (linux_thread_stopped): New.
7377 (linux_pause_all): New.
7378 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7379 linux_pause_all.
7380 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7381 (thread_db_free): Delete declaration.
7382 (thread_db_detach, thread_db_mourn): Declare.
7383 * thread-db.c (thread_db_init): Use thread_db_mourn.
7384 (thread_db_free): Delete, split in two.
7385 (disable_thread_event_reporting): New.
7386 (thread_db_detach): New.
7387 (thread_db_mourn): New.
7388
7389 * server.h (struct thread_info) <last_resume_kind>: New field.
7390 <attached>: Add comment.
7391 <gdb_detached>: New field.
7392 (handler_func): Change return type to int.
7393 (handle_serial_event, handle_target_event): Ditto.
7394 (gdb_connected): Declare.
7395 (tracing): Delete.
7396 (disconnected_tracing): Declare.
7397 (stop_tracing): Declare.
7398
7399 * server.c (handle_query) <qSupported>: Report support for
7400 disconnected tracing.
7401 (queue_stop_reply_callback): Account for running threads.
7402 (gdb_wants_thread_stopped): New.
7403 (gdb_wants_all_threads_stopped): New.
7404 (gdb_reattached_process): New.
7405 (handle_status): Clear the `gdb_detached' flag of all processes.
7406 In all-stop, stop all threads.
7407 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7408 (process_serial_event): If the remote connection breaks, or if an
7409 exit was forced with "monitor exit", force an event loop exit.
7410 Handle disconnected tracing on detach.
7411 (handle_serial_event): Adjust.
7412 (handle_target_event): If GDB isn't connected, forward events back
7413 to the inferior, unless the last process exited, in which case,
7414 exit gdbserver. Adjust interface.
7415
7416 * remote-utils.c (remote_open): Don't block in accept. Instead
7417 register an event loop source on the listen socket file
7418 descriptor. Refactor bits into ...
7419 (listen_desc): ... this new global.
7420 (gdb_connected): ... this new function.
7421 (enable_async_notification): ... this new function.
7422 (handle_accept_event): ... this new function.
7423 (remote_close): Clear remote_desc.
7424
7425 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7426
7427 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7428 New fields.
7429 (mourn_inferior): Define.
7430 (target_process_qsupported): Avoid the dangling else problem.
7431 (thread_stopped): Define.
7432 (pause_all): Define.
7433 (target_waitstatus_to_string): Declare.
7434 * target.c (target_waitstatus_to_string): New.
7435
7436 * tracepoint.c (tracing): Make extern.
7437 (disconnected_tracing): New.
7438 (stop_tracing): Make extern. Handle tracing stops due to GDB
7439 disconnecting.
7440 (cmd_qtdisconnected): New.
7441 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7442 (handle_tracepoint_general_set): Handle QTDisconnected.
7443
7444 * event-loop.c (event_handler_func): Change return type to int.
7445 (process_event): Bail out if the event handler wants the event
7446 loop to stop.
7447 (handle_file_event): Ditto.
7448 (start_event_loop): Bail out if the event handler wants the event
7449 loop to stop.
7450
7451 * nto-low.c (nto_target_ops): Adjust.
7452 * spu-low.c (spu_wait): Don't remove the process here.
7453 (spu_target_ops): Adjust.
7454 * win32-low.c (win32_wait): Don't remove the process here.
7455 (win32_target_ops): Adjust.
7456
5d267c4c
PA
74572010-04-11 Pedro Alves <pedro@codesourcery.com>
7458
7459 * regcache.c (realloc_register_cache): Invalidate inferior's
7460 regcache before recreating it.
7461
623ccd72
PA
74622010-04-09 Pedro Alves <pedro@codesourcery.com>
7463
7464 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7465
219f2f23
PA
74662010-04-09 Stan Shebs <stan@codesourcery.com>
7467 Pedro Alves <pedro@codesourcery.com>
7468
7469 * server.h (LONGEST): New.
7470 (struct thread_info) <while_stepping>: New field.
7471 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7472 Declare.
7473 (initialize_tracepoint, handle_tracepoint_general_set)
7474 (handle_tracepoint_query, tracepoint_finished_step)
7475 (tracepoint_was_hit, release_while_stepping_state_list):
7476 (current_traceframe): Declare.
7477 * server.c (handle_general_set): Handle tracepoint packets.
7478 (read_memory): New.
7479 (write_memory): New.
7480 (handle_search_memory_1): Use read_memory.
7481 (handle_query): Report support for conditional tracepoints, trace
7482 state variables, and tracepoint sources. Handle tracepoint
7483 queries.
7484 (main): Initialize the tracepoints module.
7485 (process_serial_event): Handle traceframe reads/writes.
7486
7487 * linux-low.c (handle_tracepoints): New.
7488 (linux_wait_1): Call it.
7489 (linux_resume_one_lwp): Handle while-stepping.
7490 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7491 (linux_target_ops): Install them.
7492 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7493 New field.
7494 * linux-x86-low.c (x86_supports_tracepoints): New.
7495 (the_low_target). Install it.
7496
7497 * mem-break.h (delete_breakpoint): Declare.
7498 * mem-break.c (delete_breakpoint): Make external.
7499
7500 * target.h (struct target_ops): Add `supports_tracepoints',
7501 `read_pc', and `write_pc' fields.
7502 (target_supports_tracepoints): Define.
7503 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7504 (phex_nz): New.
7505
7506 * regcache.h (struct regcache) <registers_owned>: New field.
7507 (init_register_cache, regcache_cpy): Declare.
7508 (regcache_read_pc, regcache_write_pc): Declare.
7509 (register_cache_size): Declare.
7510 (supply_regblock): Declare.
7511 * regcache.c (init_register_cache): New.
7512 (new_register_cache): Use it.
7513 (regcache_cpy): New.
7514 (register_cache_size): New.
7515 (supply_regblock): New.
7516 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7517
219f2f23
PA
7518 * tracepoint.c: New.
7519
7520 * Makefile.in (OBS): Add tracepoint.o.
7521 (tracepoint.o): New rule.
7522
3a13a53b
L
75232010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7524
7525 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7526 (i386-mmx.o): New.
7527 (i386-mmx.c): Likewise.
7528 (i386-mmx-linux.o): Likewise.
7529 (i386-mmx-linux.c): Likewise.
7530
7531 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7532 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7533 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7534 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7535
7536 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7537 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7538 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7539
1570b33e
L
75402010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7541
7542 * Makefile.in (clean): Updated.
7543 (i386-avx.o): New.
7544 (i386-avx.c): Likewise.
7545 (i386-avx-linux.o): Likewise.
7546 (i386-avx-linux.c): Likewise.
7547 (amd64-avx.o): Likewise.
7548 (amd64-avx.c): Likewise.
7549 (amd64-avx-linux.o): Likewise.
7550 (amd64-avx-linux.c): Likewise.
7551
7552 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7553 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7554 (srv_amd64_regobj): Add amd64-avx.o.
7555 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7556 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7557 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7558 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7559 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7560 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7561 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7562
7563 * i387-fp.c: Include "i386-xstate.h".
7564 (i387_xsave): New.
7565 (i387_cache_to_xsave): Likewise.
7566 (i387_xsave_to_cache): Likewise.
7567 (x86_xcr0): Likewise.
7568
7569 * i387-fp.h (i387_cache_to_xsave): Likewise.
7570 (i387_xsave_to_cache): Likewise.
7571 (x86_xcr0): Likewise.
7572
7573 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7574 * linux-crisv32-low.c (target_regsets): Likewise.
7575 * linux-m68k-low.c (target_regsets): Likewise.
7576 * linux-mips-low.c (target_regsets): Likewise.
7577 * linux-ppc-low.c (target_regsets): Likewise.
7578 * linux-s390-low.c (target_regsets): Likewise.
7579 * linux-sh-low.c (target_regsets): Likewise.
7580 * linux-sparc-low.c (target_regsets): Likewise.
7581 * linux-xtensa-low.c (target_regsets): Likewise.
7582
7583 * linux-low.c: Include <sys/uio.h>.
7584 (regsets_fetch_inferior_registers): Support nt_type.
7585 (regsets_store_inferior_registers): Likewise.
7586 (linux_process_qsupported): New.
7587 (linux_target_ops): Add linux_process_qsupported.
7588
7589 * linux-low.h (regset_info): Add nt_type.
7590 (linux_target_ops): Add process_qsupported.
7591
7592 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7593 and <sys/uio.h>.
7594 (init_registers_i386_avx_linux): New.
7595 (init_registers_amd64_avx_linux): Likewise.
7596 (xmltarget_i386_linux_no_xml): Likewise.
7597 (xmltarget_amd64_linux_no_xml): Likewise.
7598 (PTRACE_GETREGSET): Likewise.
7599 (PTRACE_SETREGSET): Likewise.
7600 (x86_fill_xstateregset): Likewise.
7601 (x86_store_xstateregset): Likewise.
7602 (use_xml): Likewise.
7603 (x86_linux_update_xmltarget): Likewise.
7604 (x86_linux_process_qsupported): Likewise.
7605 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7606 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7607 init_registers_i386_linux here. Call
7608 x86_linux_update_xmltarget.
7609 (the_low_target): Add x86_linux_process_qsupported.
7610
7611 * server.c (handle_query): Call target_process_qsupported.
7612
7613 * target.h (target_ops): Add process_qsupported.
7614 (target_process_qsupported): New.
7615
fc7238bb
PA
76162010-04-03 Pedro Alves <pedro@codesourcery.com>
7617
7618 * inferiors.c (add_thread): Set last_status kind to
7619 TARGET_WAITKIND_IGNORE.
7620 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7621 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7622 (linux_wait_1): Move `thread' local definition to block that uses
7623 it. Don't NULL initialize `event_child'.
7624 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7625 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7626 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7627
bdabb078
PA
76282010-04-01 Pedro Alves <pedro@codesourcery.com>
7629
7630 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7631 an extended waitstatus, or by a watchpoint.
7632 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7633 thread was stepping or has been stopped by a watchpoint.
7634
d3bbe7a0
PA
76352010-04-01 Pedro Alves <pedro@codesourcery.com>
7636
7637 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7638 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7639 of another, then delete the previous, and validate all
7640 breakpoints.
7641 (validate_inserted_breakpoint): New.
7642 (delete_disabled_breakpoints): New.
7643 (validate_breakpoints): New.
7644 (check_mem_read): Validate breakpoints before trusting their
7645 shadow. Delete disabled breakpoints.
7646 (check_mem_write): Validate breakpoints before trusting they
7647 should be inserted. Delete disabled breakpoints.
7648 * mem-break.h (validate_breakpoints):
7649 * server.c (handle_query): Validate breakpoints when we see a
7650 qSymbol query.
7651
8b07ae33
PA
76522010-04-01 Pedro Alves <pedro@codesourcery.com>
7653
7654 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7655 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7656 if we could tell there's a GDB breakpoint at stop_pc.
7657 (need_step_over_p): Don't do a step over if we find a GDB
7658 breakpoint at the resume PC.
7659
7660 * mem-break.c (struct raw_breakpoint): New.
7661 (enum bkpt_type): New type `gdb_breakpoint'.
7662 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7663 fields. New field `raw'.
7664 (find_raw_breakpoint_at): New.
7665 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7666 breakpoint instead.
7667 (set_breakpoint_at): Adjust.
7668 (delete_raw_breakpoint): New.
7669 (release_breakpoint): New.
7670 (delete_breakpoint): Rename to...
7671 (delete_breakpoint_1): ... this. Add proc parameter. Use
7672 release_breakpoint. Return ENOENT.
7673 (delete_breakpoint): Reimplement.
7674 (find_breakpoint_at): Delete.
7675 (find_gdb_breakpoint_at): New.
7676 (delete_breakpoint_at): Delete.
7677 (set_gdb_breakpoint_at): New.
7678 (delete_gdb_breakpoint_at): New.
7679 (gdb_breakpoint_here): New.
7680 (set_reinsert_breakpoint): Use release_breakpoint.
7681 (uninsert_breakpoint): Rename to ...
7682 (uninsert_raw_breakpoint): ... this.
7683 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7684 (reinsert_raw_breakpoint): Change parameter type to
7685 raw_breakpoint.
7686 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7687 instead.
7688 (check_breakpoints): Adjust. Use release_breakpoint.
7689 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7690 (breakpoint_inserted_here): Ditto.
7691 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7692 Don't trust the breakpoint's shadow if it is not inserted.
7693 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7694 (delete_all_breakpoints): Adjust.
7695 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7696 use delete_breakpoint_1.
7697
7698 * mem-break.h (breakpoints_supported): Delete declaration.
7699 (set_gdb_breakpoint_at): Declare.
7700 (gdb_breakpoint_here): Declare.
7701 (delete_breakpoint_at): Delete.
7702 (delete_gdb_breakpoint_at): Declare.
7703
7704 * server.h (struct raw_breakpoint): Forward declare.
7705 (struct process_info): New field `raw_breakpoints'.
7706
7707 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7708 breakpoints.
7709
6bf5e0ba
PA
77102010-03-24 Pedro Alves <pedro@codesourcery.com>
7711
7712 * linux-low.c (status_pending_p_callback): Fix comment.
7713 (linux_wait_for_event_1): Move most of the internal breakpoint
7714 handling from here...
7715 (linux_wait_1): ... to here.
7716 (count_events_callback): New.
7717 (select_singlestep_lwp_callback): New.
7718 (select_event_lwp_callback): New.
7719 (cancel_breakpoints_callback): New.
7720 (select_event_lwp): New.
7721 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7722 priority to all LWPs that have had events that should be reported
7723 to the client. Cancel breakpoints when about to reporting the
7724 event to the client, not while stopping lwps. No longer cancel
7725 finished single-steps here.
7726 (cancel_finished_single_step): Delete.
7727 (cancel_finished_single_steps): Delete.
7728
414a389f
PA
77292010-03-24 Pedro Alves <pedro@codesourcery.com>
7730
7731 * mem-break.c (enum bkpt_type): New.
7732 (struct breakpoint): New field `type'.
7733 (set_breakpoint_at): Change return type to struct breakpoint
7734 pointer. Set type to `other_breakpoint' by default.
7735 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7736 in the breakpoint list.
7737 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7738 (reinsert_breakpoint): Rename to ...
7739 (reinsert_raw_breakpoint): ... this.
7740 (reinsert_breakpoints_at): Adjust.
7741 * mem-break.h (struct breakpoint): Declare.
7742 (set_breakpoint_at): Change return type to struct breakpoint
7743 pointer.
7744
2280c721
PA
77452010-03-24 Pedro Alves <pedro@codesourcery.com>
7746
7747 * server.c (handle_query): Assign, not compare.
7748
d50171e4
PA
77492010-03-24 Pedro Alves <pedro@codesourcery.com>
7750
7751 Teach linux gdbserver to step-over-breakpoints.
7752
7753 * linux-low.c (can_hardware_single_step): New.
7754 (supports_breakpoints): New.
7755 (handle_extended_wait): If stopping threads, read the stop pc of
7756 the new cloned LWP.
7757 (get_pc): New.
7758 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7759 low target doesn't support retrieving the PC.
7760 (add_lwp): Set last_resume_kind to resume_continue.
7761 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7762 (linux_attach): Don't clear stop_expected. Set the lwp's
7763 last_resume_kind to resume_stop.
7764 (linux_detach_one_lwp): Don't check for removed breakpoints.
7765 (check_removed_breakpoint): Delete.
7766 (status_pending_p): Rename to ...
7767 (status_pending_p_callback): ... this. Don't check for removed
7768 breakpoints. Don't consider threads that are stopped from GDB's
7769 perspective.
7770 (linux_wait_for_lwp): Always read the stop_pc here.
7771 (cancel_breakpoint): New.
7772 (step_over_bkpt): New global.
7773 (linux_wait_for_event_1): Implement stepping over breakpoints.
7774 (gdb_wants_lwp_stopped): New.
7775 (gdb_wants_all_stopped): New.
7776 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7777 single-step traps here. Store the thread's last reported target
7778 wait status.
7779 (send_sigstop): Don't clear stop_expected. Always set it,
7780 instead.
7781 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7782 (cancel_finished_single_step): New.
7783 (cancel_finished_single_steps): New.
7784 (wait_for_sigstop): Don't cancel finished single-step traps here.
7785 (linux_resume_one_lwp): Don't check for removed breakpoints.
7786 Don't set `step' on non-hardware step archs.
7787 (linux_set_resume_request): Ignore resume_stop requests if already
7788 stopping or stopped. Set the lwp's last_resume_kind.
7789 (resume_status_pending_p): Don't check for removed breakpoints.
7790 (need_step_over_p): New.
7791 (start_step_over): New.
7792 (finish_step_over): New.
7793 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7794 requests. Clear the thread's last reported target waitstatus.
7795 Don't use the `suspended' flag. Don't consider pending breakpoints.
7796 (linux_resume): Start a step-over if necessary.
7797 (proceed_one_lwp): New.
7798 (proceed_all_lwps): New.
7799 (unstop_all_lwps): New.
7800 * linux-low.h (struct lwp_info): Rewrite comment for the
7801 `suspended' flag. Add the `stop_pc' field. Delete the
7802 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7803 Add `'last_resume_kind' and `need_step_over' fields.
7804 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7805 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7806 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7807 (set_raw_breakpoint_at): New.
7808 (set_breakpoint_at): Rewrite to use it.
7809 (reinsert_breakpoint_handler): Delete.
7810 (set_reinsert_breakpoint): New.
7811 (reinsert_breakpoint_by_bp): Delete.
7812 (delete_reinsert_breakpoints): New.
7813 (uninsert_breakpoint): Rewrite.
7814 (uninsert_breakpoints_at): New.
7815 (reinsert_breakpoint): Rewrite.
7816 (reinsert_breakpoints_at): New.
7817 (check_breakpoints): Rewrite.
7818 (breakpoint_here): New.
7819 (breakpoint_inserted_here): New.
7820 (check_mem_read): Adjust.
7821 * mem-break.h (breakpoints_supported, breakpoint_here)
7822 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7823 (reinsert_breakpoint_by_bp): Delete declaration.
7824 (delete_reinsert_breakpoints): Declare.
7825 (reinsert_breakpoint): Delete declaration.
7826 (reinsert_breakpoints_at): Declare.
7827 (uninsert_breakpoint): Delete declaration.
7828 (uninsert_breakpoints_at): Declare.
7829 (check_breakpoints): Adjust prototype.
7830 * server.h: Adjust include order.
7831 (struct thread_info): Declare here. Add a `last_status' field.
7832
30ba68cb
MS
78332010-03-23 Michael Snyder <msnyder@vmware.com>
7834
7835 * server.c (crc32): New function.
7836 (handle_query): Add handling for 'qCRC:' request.
7837
b9a881c2
PA
78382010-03-23 Pedro Alves <pedro@codesourcery.com>
7839
7840 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7841 lwp had been stopped by a watchpoint.
7842
e92d13d5
PA
78432010-03-16 Pedro Alves <pedro@codesourcery.com>
7844
7845 * server.h (internal_error): Declare.
7846 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7847 * utils.c (internal_error): New function.
7848
64daa791
AS
78492010-03-15 Andreas Schwab <schwab@redhat.com>
7850
7851 * configure.srv: Fix typo setting srv_regobj.
7852
f52cd8cd
PA
78532010-03-15 Pedro Alves <pedro@codesourcery.com>
7854
7855 * linux-low.c (fetch_register): Avoid passing a non string literal
7856 format to `error'.
7857 (usr_store_inferior_registers): Ditto.
7858
93ae6fdc
PA
78592010-03-14 Pedro Alves <pedro@codesourcery.com>
7860
7861 * linux-low.c (linux_write_memory): Bail out early if peeking
7862 memory failed.
7863
c3adc08c
PA
78642010-03-14 Pedro Alves <pedro@codesourcery.com>
7865
7866 * linux-low.h (struct lwp_info): New fields
7867 `stopped_by_watchpoint' and `stopped_data_address'.
7868 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7869 here, and cache them in the lwp object.
7870 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7871 directly.
7872 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7873 field.
7874 (linux_stopped_by_watchpoint): Rewrite.
7875 (linux_stopped_data_address): Rewrite.
7876
bce522a2
PA
78772010-03-06 Simo Melenius <simo.melenius@iki.fi>
7878
7879 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7880 switching the current inferior, not before.
7881
90884b2b
L
78822010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7883
7884 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7885 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7886 i386-linux.c and amd64-linux.c.
7887 (reg-i386.o): Removed.
7888 (reg-i386.c): Likewise.
7889 (reg-i386-linux.o): Likewise.
7890 (reg-i386-linux.c): Likewise.
7891 (reg-x86-64.o): Likewise.
7892 (reg-x86-64.c): Likewise.
7893 (reg-x86-64-linux.o): Likewise.
7894 (reg-x86-64-linux.c): Likewise.
7895 (i386.o): New.
7896 (i386.c): Likewise.
7897 (i386-linux.o): Likewise.
7898 (i386-linux.c): Likewise.
7899 (amd64.o): Likewise.
7900 (amd64.c): Likewise.
7901 (amd64-linux.o): Likewise.
7902 (amd64-linux.c): Likewise.
7903
7904 * configure.srv (srv_i386_regobj): New.
7905 (srv_i386_linux_regobj): Likewise.
7906 (srv_amd64_regobj): Likewise.
7907 (srv_amd64_linux_regobj): Likewise.
7908 (srv_i386_32bit_xmlfiles): Likewise.
7909 (srv_i386_64bit_xmlfiles): Likewise.
7910 (srv_i386_xmlfiles): Likewise.
7911 (srv_amd64_xmlfiles): Likewise.
7912 (srv_i386_linux_xmlfiles): Likewise.
7913 (srv_amd64_linux_xmlfiles): Likewise.
7914 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7915 srv_xmlfiles to $srv_i386_xmlfiles.
7916 (i[34567]86-*-mingw32ce*): Likewise.
7917 (i[34567]86-*-mingw*): Likewise.
7918 (i[34567]86-*-nto*): Likewise.
7919 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7920 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7921 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7922 (x86_64-*-linux*): Likewise.
7923
7924 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7925 (init_registers_amd64_linux): New.
7926 (x86_arch_setup): Replace init_registers_x86_64_linux with
7927 init_registers_amd64_linux.
7928
193f13e6
MK
79292010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7930
7931 * configure.ac: Check for libdl. If it is not available link against
7932 static libthread_db.
7933 * configure: Regenerate.
7934
85d721b8
PA
79352010-02-22 Pedro Alves <pedro@codesourcery.com>
7936
7937 PR9605
7938
7939 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7940 handing a read watchpoint.
7941 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7942
6076632b
DE
79432010-02-12 Doug Evans <dje@google.com>
7944
7945 * linux-low.c (linux_supports_tracefork_flag): Document.
7946 (linux_look_up_symbols): Add comment.
7947
3327ccf7
L
79482010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7949
7950 * regcache.c (supply_register): Clear regcache if buf is NULL.
7951
0718675c 79522010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7953 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7954
7955 * inferiors.c (find_inferior): Add function documentation.
7956 (unloaded_dll): Handle the case where the unloaded dll has not
7957 been previously registered in the dll list.
7958
177321bd
DJ
79592010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7960
7961 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7962 (thumb2_breakpoint): New.
7963 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7964
2b009048
DJ
79652010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7966
7967 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7968 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7969 breakpoints.
7970
3be029c7
PA
79712010-01-21 Pedro Alves <pedro@codesourcery.com>
7972
7973 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7974
18f5de3b
JK
79752010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7976
7977 * linux-s390-low.c (s390_collect_ptrace_register)
7978 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7979
3743bb4f
DE
79802010-01-21 Doug Evans <dje@google.com>
7981
14ce3065
DE
7982 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7983 (PTRACE_ARG4_TYPE): New macro.
7984 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7985 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7986 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7987 (usr_store_inferior_registers): Ditto.
7988 (linux_read_memory, linux_write_memory): Ditto.
7989 (linux_test_for_tracefork): Ditto.
7990
3743bb4f
DE
7991 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7992 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7993
8b315be5
PA
79942010-01-21 Pedro Alves <pedro@codesourcery.com>
7995
7996 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7997 target.
7998
85492558
PA
79992010-01-21 Pedro Alves <pedro@codesourcery.com>
8000
8001 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8002 prototype to take a regcache. Adjust.
8003
442ea881
PA
80042010-01-20 Pedro Alves <pedro@codesourcery.com>
8005
8006 * regcache.h (struct thread_info): Forward declare.
8007 (struct regcache): New.
8008 (new_register_cache): Adjust prototype.
8009 (get_thread_regcache): Declare.
8010 (free_register_cache): Adjust prototype.
8011 (registers_to_string, registers_from_string): Ditto.
8012 (supply_register, supply_register_by_name, collect_register)
8013 (collect_register_as_string, collect_register_by_name): Ditto.
8014 * regcache.c (struct inferior_regcache_data): Delete.
8015 (get_regcache): Rename to ...
8016 (get_thread_regcache): ... this. Adjust. Switch inferior before
8017 fetching registers.
8018 (regcache_invalidate_one): Adjust.
8019 (regcache_invalidate): Fix prototype.
8020 (new_register_cache): Return the new register cache.
8021 (free_register_cache): Change prototype.
8022 (realloc_register_cache): Adjust.
8023 (registers_to_string): Change prototype to take a regcache. Adjust.
8024 (registers_from_string): Ditto.
8025 (register_data): Ditto.
8026 (supply_register): Ditto.
8027 (supply_register_by_name): Ditto.
8028 (collect_register): Ditto.
8029 (collect_register_as_string): Ditto.
8030 (collect_register_by_name): Ditto.
8031 * server.c (process_serial_event): Adjust.
8032 * linux-low.h (regset_fill_func, regset_store_func): Change
8033 prototype.
8034 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8035 Change prototype.
8036 * linux-low.c (get_stop_pc): Adjust.
8037 (check_removed_breakpoint): Adjust.
8038 (linux_wait_for_event): Adjust.
8039 (linux_resume_one_lwp): Adjust.
8040 (fetch_register): Add regcache parameter. Adjust.
8041 (usr_store_inferior_registers): Ditto.
8042 (regsets_fetch_inferior_registers): Ditto.
8043 (regsets_store_inferior_registers): Ditto.
8044 (linux_fetch_registers, linux_store_registers): Ditto.
8045 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8046 regcache. Adjust.
43aaf8b6
PA
8047 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8048 Ditto.
442ea881
PA
8049 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8050 prototype to take a regcache.
8051 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8052 * remote-utils.c (convert_ascii_to_int, outreg)
8053 (prepare_resume_reply): Change prototype to take a regcache.
8054 Adjust.
8055 * target.h (struct target_ops) <fetch_registers, store_registers>:
8056 Change prototype to take a regcache.
8057 (fetch_inferior_registers, store_inferior_registers): Change
8058 prototype to take a regcache. Adjust.
8059 * proc-service.c (ps_lgetregs): Adjust.
8060 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8061 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8062 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8063 take a regcache. Adjust.
8064 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8065 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8066 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8067 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8068 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8069 (cris_cannot_fetch_register):
8070 (cris_breakpoint_at): Change prototype to take a regcache.
8071 Adjust.
8072 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8073 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8074 to take a regcache. Adjust.
8075 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8076 Adjust.
8077 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8078 take a regcache. Adjust.
8079 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8080 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8081 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8082 * linux-mips-low.c (mips_get_pc):
8083 (mips_set_pc): Change prototype to take a regcache. Adjust.
8084 (mips_reinsert_addr): Adjust.
8085 (mips_collect_register): Change prototype to take a regcache.
8086 Adjust.
8087 (mips_supply_register):
8088 (mips_collect_register_32bit, mips_supply_register_32bit)
8089 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8090 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8091 * linux-ppc-low.c (ppc_supply_ptrace_register)
8092 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8093 (parse_spufs_run): Adjust.
8094 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8095 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8096 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8097 take a regcache. Adjust.
8098 * linux-s390-low.c (s390_collect_ptrace_register)
8099 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8100 (s390_set_pc): Change prototype to take a regcache. Adjust.
8101 (s390_arch_setup): Adjust.
8102 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8103 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8104 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8105 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8106 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8107 regcache. Adjust.
8108 (sparc_breakpoint_at): Adjust.
8109 * linux-xtensa-low.c (xtensa_fill_gregset):
8110 (xtensa_store_gregset):
8111 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8112 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8113 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8114 prototype to take a regcache. Adjust.
8115 * win32-arm-low.c (arm_fetch_inferior_register)
8116 (arm_store_inferior_register): Change prototype to take a
8117 regcache. Adjust.
8118 * win32-i386-low.c (i386_fetch_inferior_register)
8119 (i386_store_inferior_register): Change prototype to take a
8120 regcache. Adjust.
8121 * win32-low.c (child_fetch_inferior_registers)
8122 (child_store_inferior_registers): Change prototype to take a
8123 regcache. Adjust.
8124 (win32_wait): Adjust.
8125 (win32_fetch_inferior_registers): Change prototype to take a
8126 regcache. Adjust.
8127 (win32_store_inferior_registers): Adjust.
8128 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8129 store_inferior_register>: Change prototype to take a regcache.
8130
60c3d7b0
DE
81312010-01-20 Doug Evans <dje@google.com>
8132
8133 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8134 #ifdef.
8135 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8136 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8137
dc146f7c
VP
81382010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8139
8140 * linux-low.c (linux_core_of_thread): New.
8141 (compare_ints, show_process, list_threads): New.
8142 (linux_qxfer_osdata): Report threads and cores.
8143 (linux_target_op): Register linux_core_of_thread.
8144 * remote-utils.c (prepare_resume_reply): Report the core.
8145 (buffer_xml_printf): Support %d specifier.
8146 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8147 New.
8148 (handle_query): Handle qXfer:threads. Announce availability
8149 thereof.
8150 * target.h (struct target_ops): New field core_of_thread.
8151
7803799a
UW
81522010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8153
8154 * Makefile.in (clean): Remove new generated files.
8155 (reg-s390.o, reg-s390.c): Remove rules.
8156 (reg-s390x.o, reg-s390x.c): Likewise.
8157 (s390-linux32.o, s390-linux32.c): Add rules.
8158 (s390-linux64.o, s390-linux64.c): Likewise.
8159 (s390x-linux64.o, s390x-linux64.c): Likewise.
8160 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8161 * linux-s390-low.c: Include <elf.h>.
8162 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8163 (init_registers_s390): Remove prototype.
8164 (init_registers_s390x): Likewise.
8165 (init_registers_s390_linux32): Add prototype.
8166 (init_registers_s390_linux64): Likewise.
8167 (init_registers_s390x_linux64): Likewise.
8168 (s390_num_regs_3264): New define.
8169 (s390_regmap_3264): New global variable.
8170 (s390_cannot_fetch_register): Remove obsolete check.
8171 (s390_cannot_store_register): Likewise.
8172 (s390_collect_ptrace_register): Handle upper/lower register halves.
8173 (s390_supply_ptrace_register): Likewise.
8174 (s390_fill_gregset): Update to register number changes.
8175 (s390_get_hwcap): New routine.
8176 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8177 Install appropriate regmap and register set.
8178
6e7ffa39
JB
81792010-01-01 Joel Brobecker <brobecker@adacore.com>
8180
8181 * server.c (gdbserver_version): Update copyright year to 2010.
8182 * gdbreplay.c (gdbreplay_version): Likewise.
8183
957f3f49
DE
81842009-12-28 Doug Evans <dje@google.com>
8185
8186 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8187 elf/external.h. Include <elf.h> instead but only if necessary.
8188
ca5c370d
PA
81892009-12-28 Pedro Alves <pedro@codesourcery.com>
8190
8191 * linux-low.c (linux_remove_process): Remove `detaching'
8192 parameter. Don't release/detach from thread_db here.
8193 (linux_kill): Release/detach from thread_db here, ...
8194 (linux_detach): ... and here, before actually detaching.
8195 (linux_wait_1): ... and here, when a process exits.
8196 * thread-db.c (any_thread_of): New.
8197 (thread_db_free): Switch the current inferior to a thread of the
8198 passed in process.
8199
4ee62156
DE
82002009-12-21 Doug Evans <dje@google.com>
8201
d90e6a88
DE
8202 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8203
c5f62d5f
DE
8204 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8205 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8206 warning ifndef __NR_tkill. Move setting of errno there too.
8207 Delete unnecessary resetting of errno after syscall.
8208 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8209
10e86dd7
DE
8210 * configure.ac: Check for dladdr.
8211 * config.in: Regenerate.
8212 * configure: Regenerate.
8213 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8214 (try_thread_db_load): Update.
8215
4ee62156
DE
8216 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8217
00f515da
DE
82182009-12-18 Doug Evans <dje@google.com>
8219
e9464885
DE
8220 * event-loop.c: Include unistd.h if it exists.
8221
07d4f67e
DE
8222 * linux-low.c (my_waitpid): Move definition away from being in
8223 between linux_tracefork_child/linux_test_for_tracefork.
8224
00f515da
DE
8225 * gdb_proc_service.h (psaddr_t): Fix type.
8226 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8227 signature to match glibc.
8228
1de1badb
DE
82292009-12-16 Doug Evans <dje@google.com>
8230
8231 * linux-low.c (linux_read_memory): Fix argument to read.
8232
aeeb81d1
PA
82332009-11-26 Pedro Alves <pedro@codesourcery.com>
8234
8235 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8236 events, don't leave current_inferior pointing at null.
8237
10357975
PA
82382009-11-26 Pedro Alves <pedro@codesourcery.com>
8239
8240 * win32-low.c (LOG): Delete.
8241 (OUTMSG): Output to stderr.
8242 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8243 on compile time LOG macro.
8244 (win32_wait): Fix debug output.
8245
cf6e3471
PA
82462009-11-26 Pedro Alves <pedro@codesourcery.com>
8247
8248 * win32-low.c (win32_add_one_solib): If the dll name is
8249 "ntdll.dll", prepend the system directory to the dll path.
8250
0c85e18e
MK
82512009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8252
8253 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8254
9ac544ce 82552009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8256 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8257
8258 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8259 * configure.ac: Check for __mcoldfire__ and set
8260 gdb_cv_m68k_is_coldfire.
8261 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8262 reg-cf.o and reg-m68k.o.
8263 * configure: Regenerated.
8264
fd7dd3e6
PA
82652009-11-16 Pedro Alves <pedro@codesourcery.com>
8266
8267 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8268 Pass it to thread_db_free.
8269 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8270 proper `detaching' argument to linux_remove_process.
8271 * linux-low.h (thread_db_free): Add `detaching' parameter.
8272 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8273 to thread_db_free.
8274 (thread_db_free): Add `detaching' parameter. Only
8275 call td_ta_clear_event if detaching from process.
8276
75aa492e
MK
82772009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8278
8279 * thread-db.c (thread_db_free): Fix typo.
8280
21e1bee4
PP
82812009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8282
8283 PR gdb/10838
8284 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8285
8838b45e
NS
82862009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8287
8288 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8289 with an i686 compiler.
8290 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8291 needed.
8292 * configure: Rebuilt.
8293
8a35fb51
SL
82942009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8295
8296 PR gdb/10783
8297
8298 * server.c (handle_search_memory_1): Correct read_addr initialization
8299 in loop for searching subsequent chunks.
8300
96f15937
PP
83012009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8302
8303 * configure.ac: New --with-libthread-db option.
8304 * thread-db.c: Allow direct dependence on libthread_db.
8305 (thread_db_free): Adjust.
8306 * config.in: Regenerate.
8307 * configure: Likewise.
889bf7c5 8308
5f7d1694
PP
83092009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8310
8311 PR gdb/10757
8312 * thread-db.c (attach_thread): New function.
8313 (maybe_attach_thread): Return success/failure.
8314 (find_new_threads_callback): Adjust.
889bf7c5
PA
8315 (thread_db_find_new_threads): Loop until no new threads.
8316
88e3b899
PA
83172009-10-13 Pedro Alves <pedro@codesourcery.com>
8318
8319 * proc-service.c (ps_lgetregs): Formatting.
8320
cdbfd419
PP
83212009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8322
8323 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8324 * configure.ac: Adjust.
8325 * linux-low.h (struct process_info_private): Move members to struct
8326 thread_db.
8327 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8328 * linux-low.c (linux_remove_process): Adjust.
8329 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8330 * server.c (handle_query): Move code ...
8331 (handle_monitor_command): ... here. New function.
8332 * target.h (struct target_ops): New member.
8333 * thread-db.c (struct thread_db): New.
8334 (libthread_db_search_path): New variable.
8335 (thread_db_create_event, thread_db_enable_reporting)
8336 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8337 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8338 (try_thread_db_load_1, dladdr_to_soname): New functions.
8339 (try_thread_db_load, thread_db_load_search): New functions.
8340 (thread_db_init): Search for libthread_db.
8341 (thread_db_free): New function.
8342 (thread_db_handle_monitor_command): Likewise.
8343 * config.in: Regenerate.
8344 * configure: Regenerate.
889bf7c5 8345
4168d2d6
UW
83462009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8347
8348 * spu-low.c (spu_kill): Wait for inferior to terminate.
8349 Call clear_inferiors.
8350 (spu_detach): Call clear_inferiors.
8351
81ecdfbb
RW
83522009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8353
8354 * aclocal.m4: Regenerate.
8355 * config.in: Likewise.
8356 * configure: Likewise.
8357
0b9ff2c0
UW
83582009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8359
8360 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8361 (parse_spufs_run): New function.
8362 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8363 (ppc_breakpoint_at): Handle SPU breakpoints.
8364
efcbbd14
UW
83652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8366
8367 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8368 (SPUFS_MAGIC): Define.
8369 (spu_enumerate_spu_ids): New function.
8370 (linux_qxfer_spu): New function.
8371 (linux_target_ops): Install linux_qxfer_spu.
8372
f4d9bade
UW
83732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8374
8375 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8376 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8377 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8378 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8379 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8380 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8381 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8382 (init_registers_powerpc_cell32l): Add prototype.
8383 (init_registers_powerpc_cell64l): Likewise.
8384 (ppc_arch_setup): Detect Cell/B.E. architecture.
8385
96e946ca
RW
83862009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8387
8388 * Makefile.in (datarootdir): New variable.
8389
58d6951d
DJ
83902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8391
8392 * linux-low.c (linux_write_memory): Update debugging output.
8393 * Makefile.in (clean): Add new descriptions.
8394 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8395 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8396 * configure.srv: Add new files for arm*-*-linux*.
8397 * linux-arm-low.c: Add new declarations.
8398 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8399 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8400 (HWCAP_VFPv3D16): New.
8401 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8402 instead of __IWMMXT__.
8403 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8404 (arm_arch_setup): New.
8405 (target_regsets): Remove #ifdef. Add VFP regset.
8406 (the_low_target): Use arm_arch_setup.
8407
12b42a12
DJ
84082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8409
8410 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8411 the main thread again.
8412
ac8c974e
AR
84132009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8414
8415 Adding Neutrino gdbserver.
8416 * configure: Regenerated.
8417 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8418 * configure.srv (i[34567]86-*-nto*): New target.
8419 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8420 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8421 (nto_comctrl) [__QNX__]: New function.
8422 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8423
4424e0c3 84242009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8425
8426 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8427 srv_tgtobj.
8428
912cf4ba
PA
84292009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8430 Pedro Alves <pedro@codesourcery.com>
8431
8432 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8433 don't support CONTEXT_EXTENDED_REGISTERS.
8434 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8435 (the_low_target): Install them.
8436 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8437 failing with ERROR_PIPE_NOT_CONNECTED.
8438
aa5ca48f
DE
84392009-06-30 Doug Evans <dje@google.com>
8440 Pierre Muller <muller@ics.u-strasbg.fr>
8441
8442 Add h/w watchpoint support to x86-linux, win32-i386.
8443 * Makefile.in (SFILES): Add i386-low.c
8444 (i386_low_h): Define.
8445 (i386-low.o): Add dependencies.
8446 (linux-x86-low.o): Add i386-low.h dependency.
8447 (win32-i386-low.o): Ditto.
8448 * i386-low.c: New file.
8449 * i386-low.h: New file.
8450 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8451 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8452 * linux-low.c (linux_add_process): Initialize arch_private.
8453 (linux_remove_process): Free arch_private.
8454 (add_lwp): Initialize arch_private.
8455 (delete_lwp): Free arch_private.
8456 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8457 provided.
8458 * linux-low.h (process_info_private): New member arch_private.
8459 (lwp_info): New member arch_private.
8460 (linux_target_ops): New members new_process, new_thread,
8461 prepare_to_resume.
8462 (ptid_of): New macro.
8463 * linux-x86-low.c: Include stddef.h, i386-low.h.
8464 (arch_process_info): New struct.
8465 (arch_lwp_info): New struct.
8466 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8467 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8468 (i386_dr_low_get_status): New function.
8469 (x86_insert_point, x86_remove_point): New functions.
8470 (x86_stopped_by_watchpoint): New function.
8471 (x86_stopped_data_address): New function.
8472 (x86_linux_new_process, x86_linux_new_thread): New functions.
8473 (x86_linux_prepare_to_resume): New function.
8474 (the_low_target): Add entries for insert_point, remove_point,
8475 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8476 prepare_to_resume.
8477 * server.c (debug_hw_points): New global.
8478 (monitor_show_help): Document set debug-hw-points.
8479 (handle_query): Process "set debug-hw-points".
8480 * server.h (debug_hw_points): Declare.
8481 (paddress): Declare.
8482 * utils.c (NUMCELLS, CELLSIZE): New macros.
8483 (get_sell, xsnprintf, paddress): New functions.
8484 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8485 remove_point, stopped_by_watchpoint, stopped_data_address.
8486 * win32-i386-low.c: Include i386-low.h.
8487 (debug_reg_state): Replaces dr.
8488 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8489 (i386_dr_low_get_status): New function.
8490 (i386_insert_point, i386_remove_point): New functions.
8491 (i386_stopped_by_watchpoint): New function.
8492 (i386_stopped_data_address): New function.
8493 (i386_initial_stuff): Update.
8494 (get_thread_context,set_thread_context,i386_thread_added): Update.
8495 (the_low_target): Add entries for insert_point,
8496 remove_point, stopped_by_watchpoint, stopped_data_address.
8497 * win32-low.c (win32_insert_watchpoint): New function.
8498 (win32_remove_watchpoint): New function.
8499 (win32_stopped_by_watchpoint): New function.
8500 (win32_stopped_data_address): New function.
8501 (win32_target_ops): Add entries for insert_watchpoint,
8502 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8503 * win32-low.h (win32_target_ops): New members insert_point,
8504 remove_point, stopped_by_watchpoint, stopped_data_address.
8505
d993e290
PA
85062009-06-25 Pedro Alves <pedro@codesourcery.com>
8507
8508 * server.c (process_serial_event): Re-return unsupported, not
8509 error, if the type isn't recognized. Re-allow supporting only
8510 insert or remove packets. Also call require_running for
8511 breakpoints. Add missing break statement to default case. Tidy.
8512 * target.h (struct target_ops): Rename insert_watchpoint to
8513 insert_point, and remove_watchpoint to remove_point.
8514
8515 * linux-low.h (struct linux_target_ops): Likewise.
8516 * linux-low.c (linux_insert_watchpoint): Rename to ...
8517 (linux_insert_point): ... this. Adjust.
8518 (linux_remove_watchpoint): Rename to ...
8519 (linux_remove_point): ... this. Adjust.
8520 (linux_target_ops): Adjust.
8521 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8522 (cris_insert_point): ... this.
8523 (cris_remove_watchpoint): Rename to ...
8524 (cris_remove_point): ... this.
8525 (the_low_target): Adjust.
8526
0f54c268
PM
85272009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8528
8529 * server.c (handle_v_kill): Pass signal_pid to
8530 kill_inferior if multi_process is zero.
8531
c6314022
AR
85322009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8533
8534 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8535 * target.h (target_ops): Comment for *_watchpoint to make it clear
8536 the functions can get types '0' and '1'.
8537
4463ce24
AR
85382009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8539
8540 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8541 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8542 * regcache.c (get_regcache): Likewise.
8543 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8544 * win32-low.c (child_fetch_inferior_registers): Remove check for
8545 regno 0.
8546
cf8fd78b
PA
85472009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8548 Pedro Alves <pedro@codesourcery.com>
8549
8550 * target.h (struct target_ops) <supports_multi_process>: New
8551 callback.
8552 (target_supports_multi_process): New.
8553 * server.c (handle_query): Even if GDB reports support, only
8554 enable multi-process if the target also supports it. Report
8555 multi-process support only if the target backend supports it.
8556 * linux-low.c (linux_supports_multi_process): New function.
8557 (linux_target_ops): Install it as target_supports_multi_process
8558 callback.
8559
47c0c975
DE
85602009-05-24 Doug Evans <dje@google.com>
8561
e09875d4
DE
8562 Global renaming of find_thread_pid to find_thread_ptid.
8563 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8564 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8565 All callers updated.
8566
e27d73f6
DE
8567 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8568 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8569 directly.
8570
47c0c975
DE
8571 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8572 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8573 (linux_resume_one_lwp): Ditto.
8574
2acc282a
DE
85752009-05-23 Doug Evans <dje@google.com>
8576
8577 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8578 from struct inferior_list_entry * to struct lwp_info *.
8579 All callers updated.
8580
9f1036c1
DE
85812009-05-13 Doug Evans <dje@google.com>
8582
8583 * linux-x86-low.c: Don't include assert.h.
8584 (x86_siginfo_fixup): Use fatal, not assert.
8585 (x86_arch_setup): Fix comment.
8586
d0722149
DE
85872009-05-12 Doug Evans <dje@google.com>
8588
8589 Biarch support for i386/amd64 gdbserver.
8590 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8591 Add linux-x86-low.c.
8592 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8593 (linux-x86-low.o): Add.
8594 * linux-x86-64-low.c: Delete.
8595 * linux-i386-low.c: Delete.
8596 * linux-x86-low.c: New file.
8597 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8598 linux-x86-low.o.
8599 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8600 linux-x86-low.o.
8601 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8602 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8603 (linux_child_pid_to_exec_file): New function.
8604 (elf_64_header_p, elf_64_file_p): New functions.
8605 (siginfo_fixup): New function.
8606 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8607 give target a chance to convert layout.
8608 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8609 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8610
fdeb2a12
DE
86112009-05-07 Doug Evans <dje@google.com>
8612
8613 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8614 (regsets_store_inferior_registers): Ditto.
8615
a6dbe5df
PA
86162009-05-06 Pedro Alves <pedro@codesourcery.com>
8617
8618 PR server/10048
8619
8620 * linux-low.c (must_set_ptrace_flags): Delete.
8621 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8622 of the global.
8623 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8624 `lwp->must_set_ptrace_flags' instead.
ba42693b 8625 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8626 (linux_wait_1): ... not here.
8627
5091eb23
DE
86282009-04-30 Doug Evans <dje@google.com>
8629
9f767825
DE
8630 * inferiors.c (started_inferior_callback): New function.
8631 (attached_inferior_callback): New function.
8632 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8633 * server.c (print_started_pid, print_attached_pid): New functions.
8634 (detach_or_kill_for_exit): New function.
8635 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8636 * server.h (have_started_inferiors_p): Declare.
8637 (have_attached_inferiors_p): Declare.
8638
5091eb23
DE
8639 * inferiors.c (remove_process): Fix memory leak, free process.
8640 * linux-low.c (linux_remove_process): New function.
8641 (linux_kill): Call it instead of remove_process.
8642 (linux_detach, linux_wait_1): Ditto.
8643
155c8968
PA
86442009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8645
8646 * configure.srv: Add x86 Windows CE target.
8647
7fe519cb
UW
86482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8649
8650 * inferiors.c (get_thread_process): Make global.
8651 * server.h (get_thread_process): Add prototype.
8652 * thread-db.c (find_one_thread): Use get_thread_process
8653 instead of current_process.
8654 (thread_db_get_tls_address): Do not crash if called when
8655 thread layer is not yet initialized.
8656
5472f405
UW
86572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8658
8659 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8660 * spu-low.c (current_tid): Rename to ...
8661 (current_ptid): ... this.
8662 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8663 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8664 ptid_get_lwp (current_ptid) instead of current_tid.
8665 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8666 instead of current_tid. Use find_process_pid to verify pid
8667 argument is valid. Pass proper argument to remove_process.
8668 (spu_thread_alive): Compare current_ptid instead of current_tid.
8669 (spu_resume): Likewise.
8670
55ac2b99
PA
86712009-04-02 Pedro Alves <pedro@codesourcery.com>
8672
8673 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8674 variable.
8675
95954743
PA
86762009-04-01 Pedro Alves <pedro@codesourcery.com>
8677
8678 Implement the multiprocess extensions, and add linux multiprocess
8679 support.
8680
8681 * server.h (ULONGEST): Declare.
8682 (struct ptid, ptid_t): New.
8683 (minus_one_ptid, null_ptid): Declare.
8684 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8685 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8686 (struct inferior_list_entry): Change `id' type from unsigned from
8687 to ptid_t.
8688 (struct sym_cache, struct breakpoint, struct
8689 process_info_private): Forward declare.
8690 (struct process_info): Declare.
8691 (current_process): Declare.
8692 (all_processes): Declare.
8693 (initialize_inferiors): Declare.
8694 (add_thread): Adjust to use ptid_t.
8695 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8696 (add_process, remove_process, find_thread_pid): Declare.
8697 (find_inferior_id): Adjust to use ptid_t.
8698 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8699 (multi_process): Declare.
8700 (push_event): Adjust to use ptid_t.
8701 (read_ptid, write_ptid): Declare.
8702 (prepare_resume_reply): Adjust to use ptid_t.
8703 (clear_symbol_cache): Declare.
8704 * inferiors.c (all_processes): New.
8705 (null_ptid, minus_one_ptid): New.
8706 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8707 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8708 (add_thread): Change unsigned long to ptid. Remove gdb_id
8709 parameter. Adjust.
8710 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8711 (gdb_id_to_thread): Rename to ...
8712 (find_thread_pid): ... this. Change unsigned long to ptid.
8713 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8714 (loaded_dll, pull_pid_from_list): Adjust.
8715 (add_process, remove_process, find_process_pid)
8716 (get_thread_process, current_process, initialize_inferiors): New.
8717 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8718 (struct target_waitstatus) <related_pid>: Ditto.
8719 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8720 return type to int.
8721 (struct target_ops) <join>: Add `pid' argument.
8722 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8723 (struct target_ops) <wait>: Add `ptid' field. Change return type
8724 to ptid.
8725 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8726 (mywait): Add `ptid' argument. Change return type to ptid_t.
8727 (target_pid_to_str): Declare.
8728 * target.c (set_desired_inferior): Adjust to use ptids.
8729 (mywait): Add new `ptid' argument. Adjust.
8730 (target_pid_to_str): New.
8731 * mem-break.h (free_all_breakpoints): Declare.
8732 * mem-break.c (breakpoints): Delelete.
8733 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8734 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8735 to use per-process breakpoint list.
8736 (free_all_breakpoints): New.
8737 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8738 (symbol_cache, all_symbols_looked_up): Delete.
8739 (hexchars): New.
8740 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8741 read_ptid): New.
8742 (prepare_resume_reply): Change ptid argument's type from unsigned
8743 long to ptid_t. Adjust. Implement W;process and X;process.
8744 (free_sym_cache, clear_symbol_cache): New.
8745 (look_up_one_symbol): Adjust to per-process symbol cache. *
8746 * server.c (cont_thread, general_thread, step_thread): Change type
8747 to ptid_t.
8748 (attached): Delete.
8749 (multi_process): New.
8750 (last_ptid): Change type to ptid_t.
8751 (struct vstop_notif) <ptid>: Change type to ptid_t.
8752 (queue_stop_reply, push_event): Change `ptid' argument's type to
8753 ptid_t.
8754 (discard_queued_stop_replies): Add `pid' argument.
8755 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8756 changes. Don't reference the `attached' global.
8757 (attach_inferior): Adjust to mywait interface changes.
8758 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8759 features. Handle and report "multiprocess+". Handle
8760 "qAttached:PID".
8761 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8762 changes.
8763 (handle_v_kill): New.
8764 (handle_v_stopped): Adjust to use target_pid_to_str.
8765 (handle_v_requests): Allow multiple attaches and runs when
8766 multiprocess extensions are in effect. Handle "vKill".
8767 (myresume): Adjust to use ptids.
8768 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8769 (handle_status): Adjust to discard_queued_stop_replies interface
8770 change.
8771 (first_thread_of, kill_inferior_callback)
8772 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8773 (main): Call initialize_inferiors. Adjust to use ptids, killing
8774 and detaching from all inferiors. Handle multiprocess packet
8775 variants.
8776 * linux-low.h: Include gdb_proc_service.h.
8777 (struct process_info_private): New.
8778 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8779 <lwpid_of>: Use ptid_get_lwp.
8780 (get_lwp_thread): Adjust.
8781 (struct lwp_info): Add `dead' member.
8782 (find_lwp_pid): Declare.
8783 * linux-low.c (thread_db_active): Delete.
8784 (new_inferior): Adjust comment.
8785 (inferior_pid): Delete.
8786 (linux_add_process): New.
8787 (handle_extended_wait): Adjust.
8788 (add_lwp): Change unsigned long to ptid.
8789 (linux_create_inferior): Add process to processes table. Adjust
8790 to use ptids. Don't set new_inferior here.
8791 (linux_attach_lwp): Rename to ...
8792 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8793 it. Adjust to use ptids.
8794 (linux_attach_lwp): New.
8795 (linux_attach): Add process to processes table. Don't set
8796 new_inferior here.
8797 (struct counter): New.
8798 (second_thread_of_pid_p, last_thread_of_process_p): New.
8799 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8800 multiple processes.
8801 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8802 processes. Remove process from process table.
8803 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8804 to multiple processes.
8805 (any_thread_of): New.
8806 (linux_detach): Add `pid' argument, and handle it. Remove process
8807 from processes table.
8808 (linux_join): Add `pid' argument. Handle it.
8809 (linux_thread_alive): Change unsighed long argument to ptid_t.
8810 Consider dead lwps as not being alive.
8811 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8812 threads we're not interested in.
8813 (same_lwp, find_lwp_pid): New.
8814 (linux_wait_for_lwp): Change `pid' argument's type from int to
8815 ptid_t. Adjust.
8816 (linux_wait_for_event): Rename to ...
8817 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8818 from int to ptid_t. Adjust.
8819 (linux_wait_for_event): New.
8820 (linux_wait_1): Add `ptid' argument. Change return type to
8821 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8822 that exit from the process table.
8823 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8824 Adjust.
8825 (mark_lwp_dead): New.
8826 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8827 stopping all threads, mark its main lwp as dead.
8828 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8829 ptids.
8830 (fetch_register, usr_store_inferior_registers)
8831 (regsets_fetch_inferior_registers)
8832 (regsets_store_inferior_registers, linux_read_memory)
8833 (linux_write_memory): Inline `inferior_pid'.
8834 (linux_look_up_symbols): Adjust to use per-process
8835 `thread_db_active'.
8836 (linux_request_interrupt): Adjust to use ptids.
8837 (linux_read_auxv): Inline `inferior_pid'.
8838 (initialize_low): Don't reference thread_db_active.
8839 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8840 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8841 (ps_getpid): Return the pid of the current inferior.
8842 * thread-db.c (proc_handle, thread_agent): Delete.
8843 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8844 per-process data.
8845 (find_one_thread): Change argument type to ptid_t. Adjust to
8846 per-process data.
8847 (maybe_attach_thread): Adjust to per-process data and ptids.
8848 (thread_db_find_new_threads): Ditto.
8849 (thread_db_init): Ditto.
8850 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8851 processes table. Adjust to use ptids.
8852 (spu_kill, spu_detach): Adjust interface. Remove process from
8853 processes table.
8854 (spu_join, spu_thread_alive): Adjust interface.
8855 (spu_wait): Adjust interface. Remove process from processes
8856 table. Adjust to use ptids.
8857 * win32-low.c (current_inferior_tid): Delete.
8858 (current_inferior_ptid): New.
8859 (debug_event_ptid): New.
8860 (thread_rec): Take a ptid. Adjust.
8861 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8862 (child_delete_thread): Ditto.
8863 (do_initial_child_stuff): Add `attached' argument. Add process to
8864 processes table.
8865 (child_fetch_inferior_registers, child_store_inferior_registers):
8866 Adjust.
8867 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8868 (win32_attach): Pass 1 to do_initial_child_stuff.
8869 (win32_kill): Adjust interface. Remove process from processes
8870 table.
8871 (win32_detach): Ditto.
8872 (win32_join): Adjust interface.
8873 (win32_thread_alive): Take a ptid.
8874 (win32_resume): Adjust to use ptids.
8875 (get_child_debug_event): Ditto.
8876 (win32_wait): Adjust interface. Remove exiting process from
8877 processes table.
8878
bd99dc85
PA
88792009-04-01 Pedro Alves <pedro@codesourcery.com>
8880
8881 Non-stop mode support.
8882
8883 * server.h (non_stop): Declare.
8884 (gdb_client_data, handler_func): Declare.
8885 (delete_file_handler, add_file_handler, start_event_loop):
8886 Declare.
8887 (handle_serial_event, handle_target_event, push_event)
8888 (putpkt_notif): Declare.
8889 * target.h (enum resume_kind): New.
8890 (struct thread_resume): Replace `step' field by `kind' field.
8891 (TARGET_WNOHANG): Define.
8892 (struct target_ops) <wait>: Add `options' argument.
8893 <supports_non_stop, async, start_non_stop>: New fields.
8894 (target_supports_non_stop, target_async): New.
8895 (start_non_stop): Declare.
8896 (mywait): Add `options' argument.
8897 * target.c (mywait): Add `options' argument. Print child exit
8898 notifications here.
8899 (start_non_stop): New.
8900 * server.c (non_stop, own_buf, mem_buf): New globals.
8901 (struct vstop_notif): New.
8902 (notif_queue): New global.
8903 (queue_stop_reply, push_event, discard_queued_stop_replies)
8904 (send_next_stop_reply): New.
8905 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8906 interface changes.
8907 (attach_inferior): In non-stop mode, don't wait for the target
8908 here.
8909 (handle_general_set): Handle QNonStop.
8910 (handle_query): When handling qC, return the current general
8911 thread, instead of the first thread of the list.
8912 (handle_query): If the backend supports non-stop mode, include
8913 QNonStop+ in the qSupported query response.
8914 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8915 and non-stop mode.
8916 (handle_v_attach, handle_v_run): Handle non-stop mode.
8917 (handle_v_stopped): New.
8918 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8919 (myresume): Adjust to use resume_kind. Handle non-stop.
8920 (queue_stop_reply_callback): New.
8921 (handle_status): Handle non-stop mode.
8922 (main): Clear non_stop flag on reconnection. Use the event-loop.
8923 Refactor serial protocol handling from here ...
8924 (process_serial_event): ... to this new function. When GDB
8925 selects any thread, select one here. In non-stop mode, wait until
8926 GDB acks all pending events before exiting.
8927 (handle_serial_event, handle_target_event): New.
8928 * remote-utils.c (remote_open): Install remote_desc in the event
8929 loop.
8930 (remote_close): Remove remote_desc from the event loop.
8931 (putpkt_binary): Rename to...
8932 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8933 (putpkt_binary): New as wrapper around putpkt_binary_1.
8934 (putpkt_notif): New.
8935 (prepare_resume_reply): In non-stop mode, don't change the
8936 general_thread.
8937 * event-loop.c: New.
8938 * Makefile.in (OBJ): Add event-loop.o.
8939 (event-loop.o): New rule.
8940
8941 * linux-low.h (pid_of): Moved here.
8942 (lwpid_of): New.
8943 (get_lwp_thread): Use lwpid_of.
8944 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8945 * linux-low.c (pid_of): Delete.
8946 (inferior_pid): Use lwpid_of.
8947 (linux_event_pipe): New.
8948 (target_is_async_p): New.
8949 (delete_lwp): New.
8950 (handle_extended_wait): Use lwpid_of.
8951 (add_lwp): Don't set lwpid field.
8952 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8953 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8954 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8955 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8956 first. Adjust to linux_wait_for_event interface changes. Use
8957 lwpid_of.
8958 (linux_detach): Don't delete the main lwp here.
8959 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8960 (status_pending_p): Don't consider explicitly suspended lwps.
8961 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8962 pointer. Add OPTIONS argument. Change return type to int. Use
8963 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8964 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8965 pointer. Add status pointer argument. Return a pid instead of a
8966 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8967 changes. In non-stop mode, don't switch to a random thread.
8968 (linux_wait): Rename to...
8969 (linux_wait_1): ... this. Add target_options argument, and handle
8970 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8971 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8972 clean exit and signal exit code. Don't stop all threads in
8973 non-stop mode. In all-stop mode, only stop all threads when
8974 reporting a stop to GDB. Handle explicit thread stop requests.
8975 (async_file_flush, async_file_mark): New.
8976 (linux_wait): New.
8977 (send_sigstop): Use lwpid_of.
8978 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8979 interface changes. In non-stop mode, don't switch to a random
8980 thread.
8981 (linux_resume_one_lwp): Use lwpid_of.
8982 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8983 (linux_resume_one_thread): ... this. Handle resume_stop. In
8984 non-stop mode, don't look for pending flag in all threads.
8985 (resume_status_pending_p): Don't consider explicitly suspended
8986 threads.
8987 (my_waitpid): Reimplement. Emulate __WALL.
8988 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8989 Use lwpid_of.
8990 (sigchld_handler, linux_supports_non_stop, linux_async)
8991 (linux_start_non_stop): New.
8992 (linux_target_ops): Register linux_supports_non_stop, linux_async
8993 and linux_start_non_stop.
8994 (initialize_low): Install SIGCHLD handler.
8995 * thread-db.c (thread_db_create_event, find_one_thread)
8996 (thread_db_get_tls_address): Use lwpid_of.
8997 * win32-low.c (win32_detach): Adjust to use resume_kind.
8998 (win32_wait): Add `options' argument.
8999 * spu-low.c (spu_resume): Adjust to use resume_kind.
9000 (spu_wait): Add `options' argument.
9001
5b1c542e
PA
90022009-04-01 Pedro Alves <pedro@codesourcery.com>
9003
9004 Decouple target code from remote protocol.
9005
9006 * target.h (enum target_waitkind): New.
9007 (struct target_waitstatus): New.
9008 (struct target_ops) <wait>: Return an unsigned long. Take a
9009 target_waitstatus pointer instead of a char pointer.
9010 (mywait): Likewise.
9011 * target.c (mywait): Change prototype to return an unsigned long.
9012 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9013 * server.h (thread_from_wait, old_thread_from_wait): Delete
9014 declarations.
9015 (prepare_resume_reply): Change prototype to take a
9016 target_waitstatus.
9017 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9018 (last_status, last_ptid): New.
9019 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9020 pid instead of a signal.
9021 (attach_inferior): Remove "status" and "signal" parameters.
9022 Adjust.
9023 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9024 not as an address.
9025 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9026 (handle_v_requests, myresume): Remove "status" and "signal"
9027 parameters. Adjust.
9028 (handle_status): New.
9029 (main): Delete local `status'. Adjust.
9030 * remote-utils.c: Include target.h.
9031 (prepare_resume_reply): Change prototype to take a
9032 target_waitstatus. Adjust.
9033
9034 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9035 interface.
9036 * spu-low.c (spu_wait): Adjust.
9037 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9038 Delete.
9039 (win32_wait): Adjust.
9040
2bd7c093
PA
90412009-04-01 Pedro Alves <pedro@codesourcery.com>
9042
9043 * target.h (struct thread_resume): Delete leave_stopped member.
9044 (struct target_ops): Add a `n' argument to the `resume' callback.
9045 * server.c (start_inferior): Adjust.
9046 (handle_v_cont, myresume): Adjust.
9047 * linux-low.c (check_removed_breakpoint): Adjust to resume
9048 interface change, and to removed leave_stopped field.
9049 (resume_ptr): Delete.
9050 (struct thread_resume_array): New.
9051 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9052 resume interface change.
9053 (linux_continue_one_thread, linux_queue_one_thread)
9054 (resume_status_pending_p): Check if the resume field is NULL
9055 instead of checking the leave_stopped member.
9056 (linux_resume): Adjust to the target resume interface change.
9057 * spu-low.c (spu_resume): Adjust to the target resume interface
9058 change.
9059 * win32-low.c (win32_detach, win32_resume): Ditto.
9060
c35fafde
PA
90612009-04-01 Pedro Alves <pedro@codesourcery.com>
9062
9063 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9064 flag.
9065 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9066 pending.
9067 (linux_continue_one_thread): Only preserve the stepping flag if
9068 there's a pending breakpoint.
9069
0a59d50b
PA
90702009-03-31 Pedro Alves <pedro@codesourcery.com>
9071
9072 * server.c (main): After the inferior having exited, call
9073 remote_close before exiting gdbserver.
9074
f04c6d38
TJB
90752009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9076
9077 Fix size of FPSCR in Power 7 processors.
9078 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9079 (PPC_FEATURE_HAS_DFP): New #define.
9080 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9081 size of the FPSCR.
9082
78e5cee6
PA
90832009-03-23 Pedro Alves <pedro@codesourcery.com>
9084
9085 * server.c (handle_query) Whitespace and formatting.
9086
1b3f6016
PA
90872009-03-22 Pedro Alves <pedro@codesourcery.com>
9088
9089 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9090 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9091 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9092 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9093 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9094 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9095 Makefile.in, configure.ac: Fix whitespace throughout.
9096 * configure: Regenerate.
9097
a07b2135
PA
90982009-03-22 Pedro Alves <pedro@codesourcery.com>
9099
9100 * inferiors.c (find_inferior): Make it safe for the callback
9101 function to delete the currently iterated inferior.
9102
67cc2626
PA
91032009-03-22 Pedro Alves <pedro@codesourcery.com>
9104
9105 * Makefile.in (linuw_low_h): Move higher.
9106 (thread-db.o): Depend on $(linux_low_h).
9107
54a0b537
PA
91082009-03-17 Pedro Alves <pedro@codesourcery.com>
9109
9110 Rename "process" to "lwp" throughout.
9111
9112 * linux-low.c (all_processes): Rename to...
9113 (all_lwps): ... this.
9114 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9115 (add_process): Rename to ...
9116 (add_lwp): ... this. Adjust.
9117 (linux_create_inferior): Adjust.
9118 (linux_attach_lwp): Adjust.
9119 (linux_attach): Adjust.
9120 (linux_kill_one_process): Rename to ...
9121 (linux_kill_one_lwp): ... this. Adjust.
9122 (linux_kill): Adjust.
9123 (linux_detach_one_process): Rename to ...
9124 (linux_detach_one_lwp): ... this. Adjust.
9125 (linux_detach): Adjust.
9126 (check_removed_breakpoint): Adjust.
9127 (status_pending_p): Adjust.
9128 (linux_wait_for_process): Rename to ...
9129 (linux_wait_for_lwp): ... this. Adjust.
9130 (linux_wait_for_event): Adjust.
9131 (send_sigstop): Adjust.
9132 (wait_for_sigstop): Adjust.
9133 (stop_all_processes): Rename to ...
9134 (stop_all_lwps): ... this.
9135 (linux_resume_one_process): Rename to ...
9136 (linux_resume_one_lwp): ... this. Adjust.
9137 (linux_set_resume_request, linux_continue_one_thread)
9138 (linux_queue_one_thread, resume_status_pending_p)
9139 (usr_store_inferior_registers, regsets_store_inferior_registers)
9140 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9141 Adjust.
9142 * linux-low.h (get_process): Rename to ...
9143 (get_lwp): ... this. Adjust.
9144 (get_thread_process): Rename to ...
9145 (get_thread_lwp): ... this. Adjust.
9146 (get_process_thread): Rename to ...
9147 (get_lwp_thread): ... this. Adjust.
9148 (struct process_info): Rename to ...
9149 (struct lwp_info): ... this.
9150 (all_processes): Rename to ...
9151 (all_lwps): ... this.
9152 * proc-service.c (ps_lgetregs): Adjust.
9153 * thread-db.c (thread_db_create_event, find_one_thread)
9154 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9155
0b16c5cf
PA
91562009-03-14 Pedro Alves <pedro@codesourcery.com>
9157
9158 * server.c (handle_query): Handle "qAttached".
9159
32de4b9d
NS
91602009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9161
9162 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9163 GPLv3, update license URL.
9164
2aecd87f
DE
91652009-03-01 Doug Evans <dje@google.com>
9166
93efd302 9167 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9168 (server_h): Add gdb_signals.h.
9169 (signals.o): Update.
9170 * server.h (target_signal_from_host,target_signal_to_host_p)
9171 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9172
86b1f9c5
PM
91732009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9174
9175 * remote-utils.c (getpkt): Also generate remote-debug
9176 information if noack_mode is set.
9177
4aa995e1
PA
91782009-02-06 Pedro Alves <pedro@codesourcery.com>
9179
9180 * server.c (handle_query): Report qXfer:siginfo:read and
9181 qXfer:siginfo:write as supported and handle them.
9182 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9183 * linux-low.c (linux_xfer_siginfo): New.
9184 (linux_target_ops): Set it.
9185
62709adf
PA
91862009-01-26 Pedro Alves <pedro@codesourcery.com>
9187
9188 * server.c (gdbserver_usage): Mention --remote-debug.
9189 (main): Accept '--remote-debug' switch.
9190
aef93bd7
DE
91912009-01-18 Doug Evans <dje@google.com>
9192
9193 * regcache.c (new_register_cache): No need to check result of xcalloc.
9194 * server.c (handle_search_memory): Back out calls to xmalloc,
9195 result is checked and error is returned to user upon failure.
9196 (handle_query): Ditto. Add more checks for result of malloc.
9197 (handle_v_cont): Check result of malloc, report error back to
9198 user upon failure.
9199 (handle_v_run): Ditto. Call freeargv.
9200 * server.h (freeargv): Declare.
9201 * utils.c (freeargv): New fn.
9202
54363045
DE
92032009-01-15 Doug Evans <dje@google.com>
9204
f626972c
DE
9205 * gdbreplay.c (perror_with_name): Make arg const char *.
9206 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9207 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9208 * utils.c (perror_with_name): Make arg const char *.
54363045 9209
18aae699
PA
92102009-01-14 Pedro Alves <pedro@codesourcery.com>
9211
9212 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9213 when handling a EXIT_PROCESS_DEBUG_EVENT.
9214
ff703abe
JB
92152009-01-06 Joel Brobecker <brobecker@adacore.com>
9216
9217 * gdbreplay.c (gdbreplay_version): Update copyright year.
9218 * server.c (gdbserver_version): Likewise.
9219
f21cc1a2 92202009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9221
9222 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9223 (handle_extended_wait): Improve comment.
0e21c1ec 9224
bca929d3
DE
92252008-12-13 Doug Evans <dje@google.com>
9226
9227 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9228 * server.h (ATTR_MALLOC): New macro.
9229 (xmalloc,xcalloc,xstrdup): Declare.
9230 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9231 * inferiors.c: Ditto.
9232 * linux-low.c: Ditto.
9233 * mem-break.c: Ditto.
9234 * regcache.c: Ditto.
9235 * remote-utils.c: Ditto.
9236 * server.c: Ditto.
9237 * target.c: Ditto.
9238 * win32-low.c: Ditto.
9239
97438e3f
DE
92402008-12-12 Doug Evans <dje@google.com>
9241
896c7fbb
DE
9242 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9243 in debugging printf.
9244
97438e3f
DE
9245 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9246
e3b886f8
DE
92472008-12-09 Doug Evans <dje@google.com>
9248
9249 * linux-low.h (struct process_info): Delete member tid, unused.
9250 * thread-db.c (find_one_thread): Update.
9251 (maybe_attach_thread): Update.
9252
07e059b5
VP
92532008-12-02 Pedro Alves <pedro@codesourcery.com>
9254
889bf7c5
PA
9255 * target.h (struct target_ops): Add qxfer_osdata member.
9256 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9257 and dirent.h.
9258 (linux_qxfer_osdata): New functions.
9259 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9260 callback.
9261 * server.c (handle_query): Handle "qXfer:osdata:read:".
9262 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9263 (buffer_xml_printf): New functions.
9264 * server.h (struct buffer): New.
9265 (buffer_grow_str, buffer_grow_str0): New macros.
9266 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9267 (buffer_xml_printf): Declare.
07e059b5 9268
4cab47ab
DE
92692008-11-24 Doug Evans <dje@google.com>
9270
9271 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9272
f142445f
DJ
92732008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9274
9275 * server.c (handle_v_run): Always use the supplied argument list.
9276
d0107bb6 92772008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9278
d0107bb6
BW
9279 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9280 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9281
2c4ad781
TJB
92822008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9283
9284 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9285 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9286 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9287 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9288 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9289 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9290 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9291 XML target descriptions.
9292 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9293 when inferior is running on an ISA 2.05 or later processor. Add
9294 special case to return offset for full 64-bit slot of FPSCR when
9295 in 32-bits.
9296
dfb64f85
DJ
92972008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9298
9299 * Makefile.in (SFILES, clean): Added sparc64 files.
9300 (reg-sparc64.o, reg-sparc64.c): New.
9301 * configure.srv (sparc*-*-linux*): New configuration.
9302 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9303 syscall arguments for SPARC.
9304 (regsets_store_inferior_registers): Likewise.
9305 * linux-sparc-low.c: New file.
9306
66b6e1dd
DE
93072008-10-21 Doug Evans <dje@google.com>
9308
9309 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9310 (READLINE_DIR,READLINE_DEP): Delete.
9311 (INTERNAL_CFLAGS): Update.
9312 (LINTFLAGS): Update.
9313
9b710a42
PA
93142008-10-10 Pedro Alves <pedro@codesourcery.com>
9315
9316 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9317 whole argv from the last run, not just argv[0].
9318
5822d809
PA
93192008-09-08 Pedro Alves <pedro@codesourcery.com>
9320
9321 * regcache.c (new_register_cache): Return NULL if the register
9322 cache size isn't known yet.
9323 (free_register_cache): Avoid dereferencing a NULL regcache.
9324
74aac56f
DJ
93252008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9326
9327 * configure.srv: Merge MIPS and MIPS64.
9328
400b20f5
MR
93292008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9330
9331 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9332
677c5bb1
LM
93332008-08-18 Luis Machado <luisgpm@br.ibm.com>
9334
9335 * Makefile.in: Add required vsx dependencies.
9336
9337 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9338 Declare init_registers_powerpc_vsx32l.
9339 Declare init_registers_powerpc_vsx64l.
9340 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9341 (ppc_arch_setup): Check for VSX in hwcap.
9342 (ppc_fill_vsxregset): New function.
9343 (ppc_store_vsxregset): New function.
9344 Add new VSX entry in regset_info target_regsets.
9345
9346 * configure.srv: Add new VSX dependencies.
9347
a6f3e723
SL
93482008-08-12 Pedro Alves <pedro@codesourcery.com>
9349
9350 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9351 (remote_open): Set or clear transport_is_reliable.
9352 (putpkt_binary): Don't expect acks in noack mode.
9353 (getpkt): Don't send ack/nac in noack mode.
9354 * server.c (handle_general_set): Handle QStartNoAckMode.
9355 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9356 qSupported.
9357 (main): Reset noack_mode on every connection.
9358 * server.h (noack_mode): Declare.
9359
a417dc56
RW
93602008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9361
9362 * Makefile.in (GDBREPLAY_OBS): New variable.
9363 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9364
3221518c
UW
93652008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9366 Daniel Jacobowitz <dan@codesourcery.com>
9367
9368 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9369 (usr_store_inferior_registers): Likewise.
9370 (regsets_store_inferior_registers): Likewise.
9371
ec56be1b
PA
93722008-07-31 Rolf Jansen <rj@surtec.com>
9373 Pedro Alves <pedro@codesourcery.com>
9374
9375 * configure.ac: Check for memmem declaration.
9376 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9377 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9378 (disable_packet_qfThreadInfo): Unconditionally compile.
9379 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9380 * configure, config.in: Regenerate.
9381
2fe5e3ff
DE
93822008-07-28 Doug Kwan <dougkwan@google.com>
9383
9384 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9385 (linux_write_memory): Remove declaration of errno.
9386
836acd6d
UW
93872008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9388
9389 * linux-low.c (handle_extended_wait): Do not use "status"
9390 variable uninitialized.
9391
aeba519e
PA
93922008-07-07 Pedro Alves <pedro@codesourcery.com>
9393
9394 * server.c (handle_v_attach): Inhibit reporting dll changes.
9395
db42f210
PA
93962008-06-27 Pedro Alves <pedro@codesourcery.com>
9397
9398 * remote-utils.c (prepare_resume_reply): If requested, don't
9399 output "thread:TID" in the T stop reply.
9400
9401 * server.c (disable_packet_vCont, disable_packet_Tthread)
9402 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9403 (handle_query): If requested, disable support for qC, qfThreadInfo
9404 and qsThreadInfo.
9405 (handle_v_requests): If requested, disable support for vCont.
9406 (gdbserver_show_disableable): New.
9407 (main): Handle --disable-packet and --disable-packet=LIST.
9408
9409 * server.h (disable_packet_vCont, disable_packet_Tthread)
9410 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9411
8e4c5421
CD
94122008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9413
9414 * server.c (gdbserver_usage): Mention --version.
9415
6e23a804
DJ
94162008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9417
9418 * Makefile.in (gdbreplay.o): New rule.
9419
90aa6a40
JM
94202008-06-06 Joseph Myers <joseph@codesourcery.com>
9421
9422 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9423 message, not gdbserver.
9424
c16158bc 94252008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9426 Nathan Sidwell <nathan@codesourcery.com>
9427 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9428
9429 * acinclude.m4: Include ../../config/acx.m4.
9430 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9431 * configure, config.in: Regenerate.
9432 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9433 * server.c (gdbserver_version): Print PKGVERSION.
9434 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9435 (main): Adjust gdbserver_usage calls.
9436 * gdbreplay.c (version, host_name): Add declarations.
9437 (gdbreplay_version, gdbreplay_usage): New.
9438 (main): Accept --version and --help options.
9439
aeb75bf5
DJ
94402008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9441
9442 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9443 (arm_breakpoint_at): Handle Thumb.
9444 (the_low_target): Add comment.
9445
76b233dd
UW
94462008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9447
9448 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9449
08388c79
DE
94502008-05-09 Doug Evans <dje@google.com>
9451
a3c83fae
DE
9452 * server.h (decode_search_memory_packet): Declare.
9453 * remote-utils.c (decode_search_memory_packet): New fn.
9454 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9455 (handle_search_memory): New fn.
9456 (handle_query): Process qSearch:memory packets.
9457
bb9c3d36
UW
94582008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9459
9460 * regcache.c (registers_length): Remove.
9461 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9462 full register packet.
9463 * regcache.h (registers_length): Remove prototype.
9464 * server.h (PBUFSIZ): Define to 16384.
9465
7284e1be
UW
94662008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9467
9468 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9469 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9470 powerpc-64l.o, and powerpc-altivec64l.o.
9471 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9472 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9473 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9474 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9475 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9476 to srv_xmlfiles.
9477
9478 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9479 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9480 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9481 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9482 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9483 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9484 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9485 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9486 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9487 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9488 (clean): Update.
9489
9490 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9491 (init_registers_powerpc_32l): ... this new prototype.
9492 (init_registers_powerpc_32): Remove, replace by ...
9493 (init_registers_powerpc_altivec32l): ... this new prototype.
9494 (init_registers_powerpc_e500): Remove, replace by ...
9495 (init_registers_powerpc_e500l): ... this new prototype.
9496 (init_registers_ppc64): Remove, replace by ...
9497 (init_registers_powerpc_64l): ... this new prototype.
9498 (init_registers_powerpc_64): Remove, replace by ...
9499 (init_registers_powerpc_altivec64l): ... this new prototype.
9500 (ppc_num_regs): Set to 73.
9501 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9502 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9503 (ppc_cannot_store_register): Handle orig_r3 and trap.
9504 (ppc_arch_setup): Update init_registers_... calls.
9505 (ppc_fill_gregset): Handle orig_r3 and trap.
9506
9507 * inferiors.c (clear_inferiors): Reset current_inferior.
9508
fdc59709
PB
95092008-04-23 Paolo Bonzini <bonzini@gnu.org>
9510
889bf7c5
PA
9511 * acinclude.m4: Add override.m4.
9512 * configure: Regenerate.
fdc59709 9513
c9b2f845
UW
95142008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9515
9516 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9517 initial call to init_register_ppc64.
9518
550512b8
UW
95192008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9520
43aaf8b6
PA
9521 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9522 single powerpc*-*-linux* case.
550512b8
UW
9523 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9524
b6430ec3
UW
95252008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9526
9527 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9528 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9529 from reg_xmlfiles.
9530 * linux-ppc-low.c: Include <elf.h>.
9531 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9532 (ppc_hwcap): New global variable.
9533 (ppc_regmap): Remove __SPE__ #ifdef sections.
9534 (ppc_regmap_e500): New global variable.
9535 (ppc_cannot_store_register): Update __SPE__ special case.
9536 (ppc_get_hwcap): New function.
9537 (ppc_arch_setup): Use it to determine whether inferior supports
9538 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9539 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9540 Do not access registers if target does not support AltiVec.
9541 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9542 Do not access registers if target does not support SPE.
9543 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9544
52fa2412
UW
95452008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9546
9547 * linux-low.c (disabled_regsets, num_regsets): New.
9548 (use_regsets_p): Delete.
9549 (linux_wait_for_process): Clear disabled_regsets.
9550 (regsets_fetch_inferior_registers): Check and set it.
9551 (regsets_store_inferior_registers): Likewise.
9552 (linux_fetch_registers, linux_store_registers): Do not use
9553 use_regsets_p.
9554 (initialize_low): Allocate disabled_regsets.
9555
e28b3332
DJ
95562008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9557
9558 * Makefile.in (LIBOBJS): New.
9559 (OBS): Use LIBOBJS.
9560 (memmem.o): New rule.
9561 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9562 * configure: Regenerated.
9563
4536995d
UW
95642008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9565
9566 * server.c (handle_query): Never return "unsupported" for
9567 qXfer:features:read queries.
9568
221c031f
UW
95692008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9570
9571 * server.c (get_features_xml): Fix inverted condition.
9572 (handle_query): Always support qXfer:feature:read.
9573
ccd213ac
DJ
95742008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9575
9576 * server.c (wrapper_argv): New.
9577 (start_inferior): Handle wrapper_argv. If set, expect an extra
9578 trap.
9579 (gdbserver_usage): Document --wrapper.
9580 (main): Parse --wrapper.
9581
6fe305f7
UW
95822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9583
9584 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9585 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9586 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9587 (ppc_set_pc): Likewise.
9588 (ppc_arch_setup): New function.
9589 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9590 of collect_register.
889bf7c5 9591 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9592
5b0a002e
UW
95932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9594
9595 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9596 instead of linux-ppc64-low.o.
9597 * linux-ppc64-low.c: Remove file.
9598 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9599 (linux-ppc64-low.o): Remove rule.
9600
9601 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9602 (init_registers_powerpc_64): Likewise.
9603 (ppc_regmap): Conditionally define depending on __powerpc64__.
9604 (ppc_cannot_store_register): Do not special-case "fpscr" when
9605 compiled on __powerpc64__.
9606 (ppc_collect_ptrace_register): New function.
9607 (ppc_supply_ptrace_register): New function.
9608 (ppc_breakpoint): Change type to "unsigned int".
9609 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9610 (the_low_target): Conditionally provide initializers for the
889bf7c5 9611 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9612 collect_ptrace_register and supply_ptrace_register members.
9613
9b4b61c8
UW
96142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9615
9616 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9617 * server.c (gdbserver_xmltarget): Define.
9618 (get_features_xml): Use it to replace "target.xml" and arch_string.
9619
9620 * configure.srv: Remove srv_xmltarget. Add XML files that were
9621 mentioned there to srv_xmlfiles instead. Remove conditional tests
9622 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9623 srv_xmlfiles and srv_regobj to include all possible choices.
9624 * configure.ac (srv_xmltarget): Remove.
9625 (srv_xmlfiles): Do not add "target.xml".
9626 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9627 checks for supplementary target information.
9628 * configure: Regenerate.
9629 * Makefile.in (XML_TARGET): Remove.
9630 (target.xml): Remove rule.
9631 (clean): Do not clean up target.xml.
9632 (.PRECIOUS): Do not mention target.xml.
9633
9634 * target.h (struct target_ops): Remove arch_string member.
9635 * linux-low.c (linux_arch_string): Remove.
9636 (linux_target_ops): Remove arch_string initializer.
9637 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9638 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9639 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9640 * spu-low.c (spu_arch_string): Remove.
9641 (spu_target_ops): Remove arch_string initializer.
9642 * win32-low.c (win32_arch_string): Remove.
9643 (win32_target_ops): Remove arch_string initializer.
9644 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9645 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9646 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9647
ee1a7ae4
UW
96482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9649
9650 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9651 by collect_ptrace_register and supply_ptrace_register hooks.
9652 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9653 instead of checking for the_low_target.left_pad_xfer.
9654 (usr_store_inferior_registers): Use collect_ptrace_register callback
9655 instead of checking for the_low_target.left_pad_xfer.
9656
9657 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9658 (s390_supply_ptrace_register): Likewise.
9659 (s390_fill_gregset): Call s390_collect_ptrace_register.
9660 (the_low_target): Update.
9661
9662 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9663 (ppc_supply_ptrace_register): Likewise.
9664 (the_low_target): Update.
9665
9666 * linux-i386-low.c (the_low_target): Update.
9667 * linux-x86-64-low.c (the_low_target): Update.
9668
d61ddec4
UW
96692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9670
9671 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9672 reg-s390.o and reg-s390x.o.
9673
9674 * linux-low.c (new_inferior): New global variable.
9675 (linux_create_inferior, linux_attach): Set it.
9676 (linux_wait_for_process): Call the_low_target.arch_setup after the
9677 target has stopped for the first time.
9678 (initialize_low): Do not call the_low_target.arch_setup.
9679
9680 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9681 (s390_set_pc): Likewise.
9682 (s390_arch_setup): New function.
9683 (the_low_target): Use s390_arch_setup as arch_setup routine.
9684
9685 * regcache.c (realloc_register_cache): New function.
9686 (set_register_cache): Call it for each existing regcache.
9687
d05b4ac3
UW
96882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9689
9690 * server.h (init_registers): Remove prototype.
9691
9692 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9693 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9694 instead of init_registers ().
9695 * linux-arm-low.c (init_registers_arm): Add prototype.
9696 (init_registers_arm_with_iwmmxt): Likewise.
9697 (the_low_target): Add initializer for arch_setup field.
9698 * linux-cris-low.c (init_registers_cris): Add prototype.
9699 (the_low_target): Add initializer for arch_setup field.
9700 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9701 (the_low_target): Add initializer for arch_setup field.
9702 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9703 (the_low_target): Add initializer for arch_setup field.
9704 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9705 (the_low_target): Add initializer for arch_setup field.
9706 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9707 (the_low_target): Add initializer for arch_setup field.
9708 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9709 (the_low_target): Add initializer for arch_setup field.
9710 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9711 (init_registers_mips64_linux): Likewise.
9712 (the_low_target): Add initializer for arch_setup field.
9713 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9714 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9715 (the_low_target): Add initializer for arch_setup field.
9716 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9717 (init_registers_powerpc_64): Likewise.
9718 (the_low_target): Add initializer for arch_setup field.
9719 * linux-s390-low.c (init_registers_s390): Add prototype.
9720 (init_registers_s390x): Likewise.
9721 (the_low_target): Add initializer for arch_setup field.
9722 * linux-sh-low.c (init_registers_sh): Add prototype.
9723 (the_low_target): Add initializer for arch_setup field.
9724 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9725 (the_low_target): Add initializer for arch_setup field.
9726 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9727 (the_low_target): Add initializer for arch_setup field.
9728
9729 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9730 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9731 instead of init_registers ().
9732 * win32-arm-low.c (init_registers_arm): Add prototype.
9733 (the_low_target): Add initializer for arch_setup field.
9734 * win32-i386-low.c (init_registers_i386): Add prototype.
9735 (the_low_target): Add initializer for arch_setup field.
9736
9737 * spu-low.c (init_registers_spu): Add prototype.
9738 (initialize_low): Call initialie_registers_spu () instead of
9739 initialize_registers ().
9740
fd96d250
PA
97412008-02-19 Pedro Alves <pedro@codesourcery.com>
9742
9743 * server.c (handle_v_requests): When handling the vRun and vAttach
9744 packets, if already debugging a process, don't kill it. Return an
9745 error instead.
9746
d41b6bb4
DJ
97472008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * server.c (handle_query): Correct length check.
9750
5ac588cf
PA
97512008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9752
9753 * win32-low.c (do_initial_child_stuff): Add process handle
9754 parameter. Set current_process_handle and current_process_id from the
9755 parameters. Clear globals.
9756 (win32_create_inferior): Don't set current_process_handle and
9757 current_process_id here. Instead pass them on the call to
9758 do_initial_child_stuff.
9759 (win32_attach): Likewise.
9760 (win32_clear_inferiors): New.
9761 (win32_kill): Don't close the current process handle or the
9762 current thread handle here. Instead call win32_clear_inferiors.
9763 (win32_detach): Don't open a new handle to the process. Call
9764 win32_clear_inferiors.
9765 (win32_join): Don't rely on current_process_handle; open a new
9766 handle using the process id.
9767 (win32_wait): Call win32_clear_inferiors when the inferior process
9768 has exited.
9769
ecd7ecbc
DJ
97702008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9771
9772 * server.c (monitor_show_help): Add "exit".
9773
1525d545
MG
97742008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9775
ecd7ecbc 9776 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9777 (clean): Add reg-xtensa.c.
9778 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9779 * configure.srv (xtensa*-*-linux*) New target.
9780 * linux-xtensa-low.c: New.
9781 * xtensa-xtregs.c: New.
1525d545 9782
59a016f0
PA
97832008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9784
9785 * hostio.c: Don't include errno.h.
9786 (errno_to_fileio_errno): Move to hostio-errno.
9787 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9788 error number outputting to the target->hostio_last_error callback.
9789 (hostio_packet_error): Use FILEIO_EINVAL directly.
9790 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9791 calls to hostio_error.
9792 * hostio-errno.c: New.
9793 * server.h (hostio_last_error_from_errno): Declare.
9794 * target.h (target_ops): Add hostio_last_error member.
9795 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9796 as hostio_last_error handler.
889bf7c5 9797 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9798 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9799 (wince_hostio_last_error): New functions.
9800 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9801 as hostio_last_error handler.
9802 (win32_target_ops) [!_WIN32_WCE]: Register
9803 hostio_last_error_from_errno as hostio_last_error handler.
9804 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9805 (hostio-errno.o): New rule.
9806 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9807 * configure.srv (srv_hostio_err_objs): New variable. Default to
9808 hostio-errno.o.
9809 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9810 * configure: Regenerate.
9811
2d717e4f
DJ
98122008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9815 (linux_kill, linux_detach): Clean up the process list.
9816 * remote-utils.c (remote_open): Improve port number parsing.
9817 (putpkt_binary, input_interrupt): Only send interrupts if the target
9818 is running.
9819 * server.c (extended_protocol): Make static.
9820 (attached): Define earlier.
9821 (exit_requested, response_needed, program_argv): New variables.
9822 (target_running): New.
9823 (start_inferior): Clear attached here.
9824 (attach_inferior): Set attached here.
9825 (require_running): Define.
9826 (handle_query): Use require_running and target_running. Implement
9827 "monitor exit".
9828 (handle_v_attach, handle_v_run): New.
9829 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9830 (gdbserver_usage): Update.
9831 (main): Redo argument parsing. Handle --debug and --multi. Handle
9832 --attach along with other options or after the port. Save
9833 program_argv. Support no initial program. Resynchronize
9834 communication with GDB after an error. Handle "monitor exit".
9835 Use require_running and target_running. Always allow the extended
9836 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9837 restart in extended mode.
9838 * README: Refer to the GDB manual. Update --attach usage.
9839
7407e2de
AS
98402007-12-20 Andreas Schwab <schwab@suse.de>
9841
9842 * linux-low.c (STACK_SIZE): Define.
9843 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9844 (linux_test_for_tracefork): Likewise.
9845
b65d95c5
DJ
98462007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9847
9848 * linux-low.c (linux_wait_for_event): Update messages. Do not
9849 reinsert auto-delete breakpoints.
9850 * mem-break.c (struct breakpoint): Change return type of handler to
9851 int.
9852 (set_breakpoint_at): Update handler type.
9853 (reinsert_breakpoint_handler): Return 1 instead of calling
9854 delete_breakpoint.
9855 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9856 setting a new one.
9857 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9858 * mem-break.h (set_breakpoint_at): Update handler type.
9859 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9860 * win32-low.c (auto_delete_breakpoint): New.
9861 (get_child_debug_event): Use it.
9862
4e799345
DJ
98632007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * configure.ac: Check for pread and pwrite.
9866 * hostio.c (handle_pread): Fall back to lseek and read.
9867 (handle_pwrite): Fall back to lseek and write.
9868 * config.in, configure: Regenerated.
9869
27524b67
DJ
98702007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9871
9872 * server.c (myresume): Add own_buf argument.
9873 (main): Update calls.
9874
a20d5e98
DJ
98752007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9876
9877 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9878 * remote-utils.c (remote_open): Do not call disable_async_io.
9879 (block_async_io): Delete.
9880 (unblock_async_io): Make static.
9881 (initialize_async_io): New.
9882 * server.c (handle_v_cont): Handle async I/O here.
9883 (myresume): Likewise. Move other common resume tasks here...
9884 (main): ... from here. Call initialize_async_io. Disable async
9885 I/O before the main loop.
9886 * server.h (initialize_async_io): Declare.
9887 (block_async_io, unblock_async_io): Delete prototypes.
9888 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9889
b79d787e
DJ
98902007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9891
9892 * remote-utils.c (readchar): Allow binary data in received messages.
9893
d97903b2
PA
98942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9895
9896 * win32-low.c (attaching): New global.
9897 (win32_create_inferior): Clear the `attaching' global.
9898 (win32_attach): Set the `attaching' global.
9899 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9900 attaching. Only set a breakpoint at the entry point if not
9901 attaching.
9902
311de423
PA
99032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9904
9905 * server.c (main): Don't report dll events on the initial
9906 connection on attaches.
9907
6c2d16d2
PA
99082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9909
9910 * server.c (main): Relax numerical bases supported for the pid of
9911 the --attach command line argument.
9912
5ca906e6
PA
99132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9914
9915 * win32-low.c (win32_attach): Call OpenProcess before
9916 DebugActiveProcess, not after. Add last error output to error
9917 call.
9918
9c6c8194
PA
99192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9920
9921 * win32-low.c (win32_get_thread_context)
9922 (win32_set_thread_context): New functions.
9923 (thread_rec): Use win32_get_thread_context.
9924 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9925 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9926 field.
9927
4d5d1aaa
PA
99282007-12-03 Leo Zayas
9929 Pedro Alves <pedro_alves@portugalmail.pt>
9930
9931 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9932 global variables.
9933 (child_add_thread): Minor cleanup.
9934 (child_continue): Resume artificially suspended threads before
9935 calling ContinueDebugEvent.
9936 (suspend_one_thread): New.
9937 (fake_breakpoint_event): New.
9938 (get_child_debug_event): Change return type to int. Check here if
9939 gdb sent an interrupt request. If a soft interrupt was requested,
9940 fake a breakpoint event. Return 0 if there is no event to handle,
9941 and 1 otherwise.
9942 (win32_wait): Don't check here if gdb sent an interrupt request.
9943 Ensure there is a valid event to handle.
9944 (win32_request_interrupt): Add soft interruption method as last
9945 resort.
9946
c436e841
PA
99472007-12-03 Leo Zayas
9948 Pedro Alves <pedro_alves@portugalmail.pt>
9949
9950 * win32-low.h (win32_thread_info): Add descriptions to the
9951 structure members. Replace `suspend_count' counter by a
9952 `suspended' flag.
9953 * win32-low.c (thread_rec): Update condition of when to get the
9954 context from the inferior. Rely on ContextFlags being set if it
9955 has already been retrieved. Only suspend the inferior thread if
9956 we haven't already. Warn if that fails.
9957 (continue_one_thread): s/suspend_count/suspended/. Only call
9958 ResumeThread once. Warn if that fails.
9959
e7b5fa67
PA
99602007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9961
9962 * win32-low.c (win32_wait): Don't read from the inferior when it
9963 has already exited.
9964
a385171d
PA
99652007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9966
9967 * Makefile.in (win32_low_h): New variable.
9968 (win32-low.o): Add dependency on $(win32_low_h).
9969 (win32-arm-low.o, win32-i386-low.o): New rules.
9970
f80c84b3
DJ
99712007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * hostio.c: Correct copyright year.
9974
a6b151f1
DJ
99752007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9976
9977 * Makefile.in (OBS): Add hostio.o.
9978 (hostio.o): New rule.
9979 * server.h (handle_vFile): Declare.
9980 * hostio.c: New file.
9981 * server.c (handle_v_requests): Take packet_len and new_packet_len
9982 for binary packets. Call handle_vFile.
9983 (main): Update call to handle_v_requests.
9984
f9387fc3
DJ
99852007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9986
9987 * linux-low.c: Include <sched.h>.
9988
51c2684e
DJ
99892007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * linux-low.c (linux_tracefork_grandchild): New.
9992 (linux_tracefork_child): Use clone.
9993 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9994
75f83163
JB
99952007-10-31 Joel Brobecker <brobecker@adacore.com>
9996
9997 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9998
da5898ce
DJ
99992007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10002
24a09b5f
DJ
100032007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * inferiors.c (change_inferior_id): Delete.
10006 (add_pid_to_list, pull_pid_from_list): New.
10007 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10008 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10009 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10010 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10011 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10012 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10013 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10014 (using_threads): Always set to 1.
10015 (handle_extended_wait): New.
10016 (add_process): Do not set TID.
10017 (linux_create_inferior): Set must_set_ptrace_flags.
10018 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10019 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10020 (linux_thread_alive): Rename TID argument to LWPID.
10021 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10022 (linux_wait_for_event): Do not use TID or check using_threads. Update
10023 call to dead_thread_notify. Call handle_extended_wait.
10024 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10025 (send_sigstop): Delete sigstop_sent.
10026 (wait_for_sigstop): Avoid TID.
10027 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10028 (linux_test_for_tracefork): New.
10029 (linux_lookup_signals): Use thread_db_active and
10030 linux_supports_tracefork_flag.
10031 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10032 * linux-low.h (get_process_thread): Avoid TID.
10033 (struct process_ifo): Move thread_known and tid to the end. Remove
10034 sigstop_sent.
10035 (linux_attach_lwp, thread_db_init): Update prototypes.
10036 * server.h (change_inferior_id): Delete prototype.
10037 (add_pid_to_list, pull_pid_from_list): New prototypes.
10038 * thread-db.c (thread_db_use_events): New.
10039 (find_first_thread): Rename to...
10040 (find_one_thread): ...this. Update callers and messages. Do not
10041 call fatal. Check thread_db_use_events. Do not call
10042 change_inferior_id or new_thread_notify.
10043 (maybe_attach_thread): Update. Do not call new_thread_notify.
10044 (thread_db_init): Set thread_db_use_events. Check use_events.
10045 * utils.c (fatal, warning): Correct message prefix.
10046
30ed0a8f
DJ
100472007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * Makefile.in (clean): Remove new files.
10050 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10051 (powerpc-64.o, powerpc-64.c): New rules.
10052 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10053 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10054 with SPE.
10055 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10056 SPE targets.
10057 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10058 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10059 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10060 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10061 (target_regsets): Add AltiVec and SPE register sets.
10062 * configure.ac: Check for AltiVec and SPE.
10063 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10064 (ppc_fill_vrregset, ppc_store_vrregset): New.
10065 (target_regsets): Add AltiVec register set.
10066 * configure: Regenerated.
10067
fd462a61
DJ
100682007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * linux-low.c (O_LARGEFILE): Define.
10071 (linux_read_memory): Use /proc/PID/mem.
10072 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10073 * configure, config.in: Regenerated.
10074
69f223ed
DJ
100752007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10076
10077 * linux-low.c (linux_wait_for_event): Do not pass signals while
10078 single-stepping.
10079
aec18585
PA
100802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10081
10082 * win32-low.c (create_process): New.
10083 (win32_create_inferior): Use create_process instead of
10084 CreateProcess. If create_process failed retry appending an ".exe"
10085 suffix. Store the GetLastError result immediatelly after
10086 create_process calls and use it on the call to error.
10087
34d86ddd
PA
100882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10089
10090 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10091
5a0e3bd0
JB
100922007-08-23 Joel Brobecker <brobecker@adacore.com>
10093
10094 * configure.ac: Switch license to GPLv3.
10095
f88c79e6
MS
100962007-08-01 Michael Snyder <msnyder@access-company.com>
10097
10098 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10099
6b3d9b83
PA
101002007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10101
10102 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10103 typedef.
10104 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10105 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10106 CloseToolhelp32Snapshot.
10107 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10108 CloseToolhelp32Snapshot.
10109
c588c53c
MS
101102007-07-27 Michael Snyder <michael.snyder@access-company.com>
10111
10112 * server.c (main): Check for inferior exit before main loop.
10113
aa0403d9
PA
101142007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10115
10116 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10117 instead of on tmp_desc.
10118
255e7678
DJ
101192007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10120 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10123 (add_thread): Minor cleanups.
10124 (clear_inferiors): Move lower in the file. Clear the DLL
10125 list.
10126 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10127 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10128 (xml_escape_text): New.
10129 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10130 for qSupported.
10131 (handle_v_cont): Report errors.
10132 (gdbserver_version): Update.
10133 (main): Correct size of own_buf. Do not report initial DLL events.
10134 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10135 (unloaded_dll, xml_escape_text): New.
10136 * win32-low.c (enum target_waitkind): Update comments.
10137 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10138 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10139 (win32_EnumProcessModules, win32_GetModuleInformation)
10140 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10141 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10142 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10143 (win32_Module32First, win32_Module32Next, load_toolhelp)
10144 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10145 (get_child_debug_event): Handle DLL events.
10146 (win32_wait): Likewise.
10147
0d37add9
DJ
101482007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10151 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10152
45e2715e
PA
101532007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10154
10155 * win32-low.c (handle_output_debug_string): Ignore event if not
10156 waiting.
10157
c5674cf1
PA
101582007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10159
10160 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10161
2bbe3cc1
DJ
101622007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10163
10164 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10165
ae13219e
DJ
101662007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * inferiors.c (change_inferior_id): Add comment.
10169 * linux-low.c (check_removed_breakpoint): Add an early
10170 prototype. Improve debug output.
10171 (linux_attach): Doc update.
10172 (linux_detach_one_process, linux_detach): Clean up before releasing
10173 each process.
10174 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10175 * linux-low.h (struct process_info): Doc improvement.
10176 * mem-break.c (delete_all_breakpoints): New.
10177 * mem-break.h (delete_all_breakpoints): New prototype.
10178 * thread-db.c (find_first_thread): New.
10179 (thread_db_create_event): Call it instead of
10180 thread_db_find_new_threads. Clean up unused variables.
10181 (maybe_attach_thread): Remove first thread handling.
10182 (thread_db_find_new_threads): Use find_first_thread.
10183 (thread_db_get_tls_address): Likewise.
10184
4105de34
DJ
101852007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * thread-db.c (thread_db_find_new_threads): Add prototype.
10188 (thread_db_create_event): Check for the main thread before adding
10189 a new thread.
10190 (maybe_attach_thread): Only enable event reporting if TID == 0.
10191 (thread_db_get_tls_address): Check for new threads.
10192
2b876972
DJ
101932007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * linux-low.c (linux_create_inferior): Try execv before execvp.
10196 * spu-low.c (spu_create_inferior): Likewise.
10197
7a245884
DJ
101982007-06-13 Mike Frysinger <vapier@gentoo.org>
10199
10200 * linux-low.c (linux_create_inferior): Change execv to execvp.
10201 * spu-low.c (spu_create_inferior): Likewies.
10202
117ce543
DJ
102032007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10204
10205 * Makefile.in (clean): Clean new files instead of deleted ones.
10206 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10207 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10208 rules.
10209 * configure.srv: Specify XML files and new regformats for MIPS and
10210 MIPS64 GNU/Linux.
10211 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10212 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10213 an entry for the restart register.
10214 (mips_cannot_fetch_register, mips_cannot_store_register)
10215 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10216 register names to match the XML descriptions.
10217 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10218 restart register instead of $0.
10219
0e7f50da
UW
102202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10221 Markus Deuling <deuling@de.ibm.com>
10222
10223 * remote-utils.c (decode_xfer_write): New function.
10224 * server.h (decode_xfer_write): Add prototype.
10225 * server.c (handle_query): Add PACKET_LEN argument. Support
10226 qXfer:spu:read and qXfer:spu:write packets.
10227 (main): Pass packet_len to handle_query.
10228 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10229 * target.h (target_ops): Add qxfer_spu.
10230
374c1d38
UW
102312007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10232
10233 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10234 accessing non-seekable spufs files.
10235
bb63802a
UW
102362007-05-16 Markus Deuling <deuling@de.ibm.com>
10237
889bf7c5 10238 * server.c (handle_query): Add reply for qC packet.
bb63802a 10239
7390519e
PA
102402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10241 Leo Zayas <lerele@champenstudios@com>
10242
10243 * server.h (check_remote_input_interrupt_request): New function.
10244 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10245 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10246 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10247 (check_remote_input_interrupt_request): New function.
10248 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10249 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10250 winapi_GenerateConsoleCtrlEvent): New typedefs.
10251 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10252 to 250 ms.
10253 (win32_wait): Check for remote interrupt request
10254 with check_remote_input_interrupt_request.
10255 (win32_request_interrupt): New function.
10256 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10257
34b34921
PA
102582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10259
10260 * win32-low.c (debug_registers_changed,
10261 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10262 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10263 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10264 (thread_rec): Get context using the low target.
10265 (child_add_thread): Call thread_added on the low target,
10266 which does the same thing.
10267 (regptr): Delete.
10268 (do_initial_child_stuff): Remove debug registers references.
10269 Set context using the low target. Resume threads after
10270 setting the contexts.
10271 (child_continue): Remove dead variable. Remove debug
10272 registers references.
10273 (child_fetch_inferior_registers): Go through the low target.
10274 (do_child_store_inferior_registers): Remove.
10275 (child_store_inferior_registers): Go through the low target.
10276 (win32_resume): Remove debug registers references.
10277 Set context using the low target.
10278 (handle_exception): Change return type to void. Don't record
10279 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10280 first chance exception.
889bf7c5 10281 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10282 goto loop. Always return after waiting for debug event.
10283 (win32_wait): Convert to switch statement. Handle spurious
10284 events.
10285
10286 * win32-i386-low.c (debug_registers_changed,
10287 debug_registers_used): New.
10288 (initial_stuff): Rename to ...
10289 (i386_initial_stuff): ... this. Clear debug registers
10290 state variables.
10291 (store_debug_registers): Delete.
10292 (i386_get_thread_context): New.
10293 (load_debug_registers): Delete.
10294 (i386_set_thread_context): New.
10295 (i386_thread_added): New.
10296 (single_step): Rename to ...
10297 (i386_single_step): ... this.
10298 (do_fetch_inferior_registers): Rename to ...
10299 (i386_fetch_inferior_register): ... this.
10300 (i386_store_inferior_register): New.
10301 (the_low_target): Adapt to new interface.
10302
10303 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10304 (arm_get_thread_context): New.
10305 (arm_set_thread_context): New.
10306 (regptr): New.
10307 (do_fetch_inferior_registers): Rename to ...
10308 (arm_fetch_inferior_register): ... this.
10309 (arm_store_inferior_register): New.
10310 (arm_wince_breakpoint): Reimplement as unsigned long.
10311 (arm_wince_breakpoint_len): Define.
10312 (the_low_target): Adapt to new interface.
10313
10314 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10315 load_debug_registers. Add get_thread_context, set_thread_context,
10316 thread_added and store_inferior_register. Rename
10317 fetch_inferior_registers to fetch_inferior_register.
10318 (regptr): Remove declaration.
10319
dd6953e1
PA
103202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10321
10322 * linux-low.c (linux_detach): Change return type to int. Return 0.
10323 * spu-low.c (spu_detach): Likewise.
10324
444d6139
PA
103252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10326
10327 * target.h (target_ops): Change return type of detach to int.
10328 Add join.
10329 (join_inferior): New.
10330 * server.c (main): Don't skip detach support on mingw32.
10331 If the inferior doesn't support detaching return error.
10332 Call join_inferior instead of using waitpid.
10333 * linux-low.c (linux_join): New.
10334 (linux_target_op): Add linux_join.
10335 * spu-low.c (spu_join): New.
10336 (spu_target_ops): Add spu_join.
10337 * win32-low.c (win32_detach): Adapt to new interface.
10338 Reopen current_process_handle before detaching. Issue a child
10339 resume before detaching.
10340 (win32_join): New.
10341 (win32_target_op): Add win32_join.
10342
1d5315fe
PA
103432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10344
10345 * win32-low.c (win32-attach): Fix return value.
10346 * target.h (target_ops): Describe ATTACH return values.
10347
bf914831
PA
103482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10349
10350 * win32-low.c (GETPROCADDRESS): Define.
10351 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10352 (winapi_DebugSetProcessKillOnExit): Likewise.
10353 (win32_create_inferior): Force usage of ansi CreateProcessA.
10354 (win32_attach): Use GETPROCADDRESS.
10355 (win32_detach): Likewise.
10356
f72f3e60
PA
103572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10358
10359 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10360
ed50f18f
PA
103612007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10362
10363 * win32-low.c: Commit leftover changes from 2007-03-29.
10364
0c2ead7e
DJ
103652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10366
10367 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10368 fields short instead of int. Add explicit padding.
10369 (i387_cache_to_fsave): Remove unnecessary casts.
10370 (i387_fsave_to_cache): Doc fix.
10371 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10372
73725ff3
DJ
103732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10376 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10377
d99f33d8
PA
103782007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10379
10380 * configure.srv (arm*-*-mingw32ce*): Move near the other
10381 arm targets.
10382
68070c10
PA
103832007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10384
2482afc6 10385 * configure.ac: Add errno checking.
68070c10
PA
10386 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10387 sys/file.h and malloc.h.
10388 (AC_CHECK_DECLS): Add perror.
10389 (srv_mingwce): Handle.
2482afc6 10390 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10391 win32-i386-low.o to srv_tgtobj.
10392 (i[34567]86-*-mingw*): Likewise.
10393 (arm*-*-mingw32ce*): Add case.
10394 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10395 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10396 [__MINGW32CE__] (strerror): New function.
10397 [__MINGW32CE__] (errno): Define to GetLastError.
10398 [__MINGW32CE__] (COUNTOF): New macro.
10399 (remote_open): Remove extra close call.
10400 * mem-break.c (delete_breakpoint_at): New function.
10401 * mem-break.h (delete_breakpoint_at): Declare.
10402 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10403 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10404 [USE_WIN32API] (read, write): Add char* casts.
10405 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10406 * server.h: Include wincecompat.h on Windows CE.
10407 [HAVE_ERRNO_H]: Check.
10408 (perror): Declare if not declared.
10409 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10410 (perror_with_name): Remove errno declaration.
10411 * wincecompat.h: New.
10412 * wincecompat.c: New.
10413 * win32-low.h: New.
10414 * win32-arm-low.c: New.
10415 * win32-i386-low.c: New.
10416 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10417 (OUTMSG2): Make it safe.
10418 (_T): New macro.
10419 (COUNTOF): New macro.
10420 (NUM_REGS): Get it from the low target.
10421 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10422 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10423 (thread_rec): Let low target handle debug registers.
10424 (child_add_thread): Likewise.
10425 (child_init_thread_list): Likewise.
10426 (continue_one_thread): Likewise.
10427 (regptr): New.
10428 (do_child_fetch_inferior_registers): Move to ...
10429 * win32-i386-low.c: ... here, and rename to ...
10430 (do_fetch_inferior_registers): ... this.
889bf7c5 10431 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10432 Go through the low target.
10433 (do_child_store_inferior_registers): Use regptr.
10434 (strwinerror): New function.
10435 (win32_create_inferior): Handle Windows CE.
10436 Use strwinerror instead of strerror on Windows error
10437 codes. Add program to the error output.
10438 Don't close the main thread handle on Windows CE.
10439 (win32_attach): Use coredll.dll on Windows CE.
10440 (win32_kill): Close current process and current
10441 thread handles.
10442 (win32_detach): Use coredll.dll on Windows CE.
10443 (win32_resume): Let low target handle debug registers, and
10444 step request.
10445 (handle_exception): Add/Remove initial breakpoint. Avoid
10446 non-existant WSTOPSIG on Windows CE.
10447 (win32_read_inferior_memory): Cast to remove warning.
10448 (win32_arch_string): Go through the low target.
10449 (initialize_low): Call set_breakpoint_data with the low
10450 target's breakpoint.
10451 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10452 FOP_REGNUM, mappings): Move to ...
10453 * win32-i386-low.c: ... here.
10454 * win32-low.c (win32_thread_info): Move to ...
10455 * win32-low.h: ... here.
10456 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10457 win32-arm-low.c and wincecompat.c.
10458 (all:): Add $EXEEXT.
10459 (install-only:): Likewise.
10460 (gdbserver:): Likewise.
10461 (gdbreplay:): Likewise.
10462 * config.in: Regenerate.
10463 * configure: Regenerate.
10464
41093d81
PA
104652007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10466
10467 * win32-low.c: Rename typedef thread_info to
10468 win32_thread_info throughout.
10469
544afa54
PA
104702007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10471
10472 * win32-i386-low.c: Rename to ...
10473 * win32-low.c: ... this.
10474 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10475 * Makefile.in: Likewise.
10476
bce7165d
PA
104772007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10478
10479 * remote-utils.c (monitor_output): Constify msg parameter.
10480 * server.h (monitor_output): Likewise.
10481 * win32-i386-low.c (handle_output_debug_string): New.
10482 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10483 handle_output_debug_string.
10484 (get_child_debug_event): Likewise.
10485
506c7aa0
DJ
104862007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10487
10488 * server.c (main): Correct strtoul check.
10489
42c81e2a
DJ
104902007-03-27 Jon Ringle <jon@ringle.org>
10491
10492 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10493
9453113a
DJ
104942007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10495
10496 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10497
64a69107
DJ
104982007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10499
10500 * terminal.h: Check HAVE_SGTTY_H.
10501
105022007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10503
10504 * remote-utils.c (remote_open): Print out the assigned port number.
10505
c74d0ad8
DJ
105062007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10507
10508 * remote-utils.c (monitor_output): New function.
10509 * server.c (debug_threads): Define here.
10510 (monitor_show_help): New function.
10511 (handle_query): Handle qRcmd.
10512 (main): Do not handle 'd' packet.
10513 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10514 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10515 of debug_threads.
10516
de7c3b4a
PA
105172007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10518
10519 * Makefile.in (EXEEXT): New.
10520 (clean): Use $(EXEEXT).
10521
ef57601b
PA
105222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10523
10524 * target.h (target_ops): Rename send_signal to request_interrupt,
10525 and remove enum target_signal parameter.
10526 * linux-low.c (linux_request_interrupt): Rename from
10527 linux_send_signal, and always send SIGINT.
10528 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10529 and always send SIGINT.
10530 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10531 of send_signal.
10532 (input_interrupt): Likewise.
10533
820f2bda
PA
105342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10535
10536 * server.c (get_features_xml): Check if target implemented
10537 arch_string.
10538 * win32-i386-low.c (win32_arch_string): New.
10539 (win32_target_ops): Add win32_arch_string as arch_string member.
10540
ab39bf24
UW
105412007-02-22 Markus Deuling <deuling@de.ibm.com>
10542
10543 * spu-low.c (spu_arch_string): New.
10544 (spu_target_ops): Add spu_arch_string.
10545
61ff6e04
DJ
105462007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10547
10548 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10549 * configure.ac: Do not check for terminal.h.
10550 * configure, config.in: Regenerated.
10551
fb1e4ffc
DJ
105522007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * Makefile.in (OBS): Add $(XML_BUILTIN).
10555 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10556 (clean): Update.
10557 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10558 (arm-with-iwmmxt.c): New.
10559 * config.in, configure: Regenerate.
10560 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10561 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10562 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10563 (arm*-*-linux*): Add iWMMXt and regset support.
10564 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10565 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10566 (arm_store_wmmxregset, target_regsets): New.
10567 * server.c (get_features_xml): Take annex argument. Check builtin
10568 XML documents.
10569 (handle_query): Handle multiple annexes.
10570
0f48aa01
DJ
105712007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * remote-utils.c [USE_WIN32API] (read, write): Define.
10574 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10575 write.
10576
23181151
DJ
105772007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10578
10579 * linux-i386-low.c (the_low_target): Set arch_string.
10580 * linux-x86-64-low.c (the_low_target): Likewise.
10581 * linux-low.c (linux_arch_string): New.
10582 (linux_target_ops): Add it.
10583 * linux-low.h (struct linux_target_ops): Add arch_string.
10584 * server.c (write_qxfer_response): Use const void * for DATA.
10585 (get_features_xml): New.
10586 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10587 * target.h (struct target_ops): Add arch_string method.
10588
9d606399
DJ
105892007-01-03 Denis Pilat <denis.pilat@st.com>
10590 Daniel Jacobowitz <dan@codesourcery.com>
10591
10592 * linux-low.c (linux_kill): Handle being called with no threads.
10593 * win32-i386-low.c (win32_kill): Likewise.
10594 (get_child_debug_event): Clear current_process_handle.
10595
105962006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10597 Daniel Jacobowitz <dan@codesourcery.com>
10598
10599 * remote-utils.c (remote_open): Check the type of specified
10600 serial port devices before opening them.
10601 * server.c (main): Kill the inferior if an error occurs during
10602 the first remote_open.
10603
a5e13d24
DJ
106042006-12-05 Markus Deuling <deuling@de.ibm.com>
10605
10606 * README: Update supported targets.
10607
186947f7
DJ
106082006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10609
10610 * Makefile.in (clean): Remove reg-mips64.c.
10611 (reg-mips64.c, reg-mips64.o): New rules.
10612 * configure.srv: Handle mips64. Include regset support for mips.
10613 * linux-mips-low.c (union mips_register): New.
10614 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10615 (mips_breakpoint, mips_breakpoint_at): Use int.
10616 (mips_collect_register, mips_supply_register)
10617 (mips_collect_register_32bit, mips_supply_register_32bit)
10618 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10619 (mips_store_fpregset, target_regsets): New.
10620 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10621
a13e2c95
UW
106222006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10623
10624 * configure.srv: Add target "spu*-*-*".
10625 * Makefile.in (clean): Remove reg-spu.c.
10626 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10627 * spu-low.c: New file.
10628
cb7283db
DJ
106292006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * configure.ac: Correct td_thr_tls_get_addr test.
10632 * configure: Regenerated.
10633
89be2091
DJ
106342006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10635
10636 * linux-low.c (linux_wait_for_event): Reformat. Use the
10637 pass_signals array.
10638 * remote-utils.c (decode_address_to_semicolon): New.
10639 * server.c (pass_signals, handle_general_set): New.
10640 (handle_query): Mention QPassSignals for qSupported.
10641 (main): Call handle_general_set.
10642 * server.h (pass_signals, decode_address_to_semicolon): New.
10643
000ef4f0
DJ
106442006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10645
10646 * server.c (handle_query): Correct error handling for read_auxv.
10647
b7149293
UW
106482005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10649
10650 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10651 and srv_linux_thread_db to yes.
10652 * linux-s390-low.c (s390_fill_gregset): New function.
10653 (target_regsets): Define data structure.
10654
dae5f5cf
DJ
106552006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10656
10657 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10658 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10659 * config.in, configure: Regenerated.
10660 * inferiors.c (gdb_id_to_thread): New function.
10661 (gdb_id_to_thread_id): Use it.
10662 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10663 * linux-low.h (struct process_info): Add th member.
10664 (thread_db_get_tls_address): New prototype.
10665 * remote-utils.c (decode_address): Make non-static.
10666 * server.c (handle_query): Handle qGetTLSAddr.
10667 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10668 * target.h (struct target_ops): Add get_tls_address.
10669 * thread-db.c (maybe_attach_thread): Save the thread handle.
10670 (thread_db_get_tls_address): New.
10671
32ca6d61
DJ
106722006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10673
10674 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10675 (linux_resume_one_process): Take a siginfo_t *. Update all
10676 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10677 (struct pending_signals): Add a siginfo_t.
10678 (linux_wait_for_process): Always set last_status.
10679 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10680 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10681 * linux-low.h (struct process_info): Add last_status.
10682
5ffff7c1
DJ
106832006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10684
10685 * remote-utils.c (try_rle): New function.
10686 (putpkt_binary): Use it.
10687
8695c747
DJ
106882006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10689
10690 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10691 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10692 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10693 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10694 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10695 point registers.
10696
290fadea
RS
106972006-08-08 Richard Sandiford <richard@codesourcery.com>
10698
10699 * server.c (terminal_fd): New variable.
10700 (old_foreground_pgrp): Likewise.
10701 (restore_old_foreground_pgrp): New function.
10702 (start_inferior): Record the terminal file descriptor in terminal_fd
10703 and its original foreground group in old_foreground_pgrp. Register
10704 restore_old_foreground_pgrp with atexit().
10705
9f2e1e63
DJ
107062006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10707
10708 * server.c (handle_query): Correct qPart to qXfer.
10709
b80864fb
DJ
107102006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10711
10712 * configure.ac: Check for more headers which are missing on
10713 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10714 * configure.srv: Add Cygwin and mingw32.
10715 * remote-utils.c: Don't include headers unconditionally which
10716 are missing on mingw32. Include <winsock.h> for mingw32.
10717 (remote_open): Adjust for mingw32 support. Flush
10718 standard error after writing to it.
10719 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10720 (unblock_async_io, enable_async_io, disable_async_io)
10721 (readchar, getpkt): Update for Winsock support.
10722 (prepare_resume_reply): Expect a protocol signal number.
10723 * server.c: Disable <sys/wait.h> on mingw32.
10724 (start_inferior): Adjust for mingw32 support. Flush
10725 standard error after writing to it.
10726 (attach_inferior): Likewise. Use protocol signal
10727 numbers.
10728 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10729 and names.
10730 * win32-i386-low.c: New file.
10731 * Makefile.in (XM_CLIBS): Set.
10732 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10733 (win32-i386-low.o): New dependency rule.
10734 * linux-low.c (linux_wait): Use target signal numbers.
10735 * target.h (struct target_ops): Doc fix.
10736 * server.h (target_signal_to_name): New prototype.
10737 * gdbreplay.c: Don't include headers unconditionally which
10738 are missing on mingw32. Include <winsock.h> for mingw32.
10739 (remote_close, remote_open): Adjust for Winsock support.
10740 * configure, config.in: Regenerated.
10741
0876f84a
DJ
107422006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * server.c (decode_xfer_read, write_qxfer_response): New.
10745 (handle_query): Take a packet length argument. Handle
10746 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10747 the qSupported response.
10748 (main): Update call to handle_query.
10749
01f9e8fa
DJ
107502006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10751
10752 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10753 (putpkt_binary): Renamed from putpkt and adjusted for binary
10754 data.
10755 (putpkt): New wrapper for putpkt_binary.
10756 (readchar): Don't mask off the high bit.
10757 (decode_X_packet): New function.
10758 * server.c (main): Call putpkt_binary if a handler sets the packet
10759 length. Save the length of the incoming packet. Handle 'X'.
10760 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10761
be2a5f71
DJ
107622006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * server.c (handle_query): Handle qSupported.
10765
ea025f5f
DJ
107662006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10767
10768 * remote-utils.c (all_symbols_looked_up): New variable.
10769 (look_up_one_symbol): Check it.
10770 * server.h (look_up_one_symbol): New declaration.
10771 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10772
9308fc88
DJ
107732006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10774
10775 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10776 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10777 (PTRACE_GET_THREAD_AREA): Define.
10778 (ps_get_thread_area): New function.
10779
52fb6437
NS
107802006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10781
10782 * configure.srv (m68k*-*-uclinux*): New target.
10783 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10784 (linux_resume_one_process): Remove extraneous cast.
10785 (linux_read_offsets): New.
10786 (linux_target_op): Add linux_read_offsets on mmuless systems.
10787 * server.c (handle_query): Add qOffsets logic.
10788 * target.h (struct target_ops): Add read_offsets.
10789
21b0f40c
DJ
107902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10793 (PTRACE_GET_THREAD_AREA): Define.
10794 (ps_get_thread_area): New function.
10795 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10796 (linux-x86-64-low.o): Update.
10797
0050a760
DJ
107982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * configure.ac: Remove checks for prfpregset_t.
10801 * gdb_proc_service.h: New file.
10802 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10803 new "gdb_proc_service.h".
10804 * proc-service.c: Likewise.
10805 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10806 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10807 * Makefile.in (gdb_proc_service_h): Updated.
10808 * configure, config.in: Regenerated.
10809
b92a518e
DJ
108102006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10811
10812 * remote-utils.c (prepare_resume_reply): Move declaration
10813 of gdb_id_from_wait to the top of the block.
10814
545587ee
DJ
108152006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10816
10817 * linux-low.c (regsets_store_inferior_registers): Read the regset
10818 from the target before filling it.
10819
9db87ebd
DJ
108202006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10821
10822 * server.c (attach_inferior): Return SIGTRAP for a successful
10823 attach.
10824
dd24457d
DJ
108252006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10826
10827 * Makefile.in (OBS): Add version.o.
10828 (STAGESTUFF): Delete.
10829 (version.o): Add dependencies.
10830 (version.c): Replace rule.
10831 (clean): Remove version.c.
10832 * server.c (gdbserver_version): New.
10833 (gdbserver_usage): Use printf.
10834 (main): Handle --version and --help.
10835 * server.h (version, host_name): Add declarations.
10836
6f0f660e
EZ
108372005-12-23 Eli Zaretskii <eliz@gnu.org>
10838
889bf7c5
PA
10839 * linux-arm-low.c:
10840 * linux-arm-low.c:
10841 * inferiors.c:
10842 * i387-fp.h:
10843 * i387-fp.c:
10844 * gdbreplay.c:
10845 * regcache.c:
10846 * proc-service.c:
10847 * mem-break.h:
10848 * mem-break.c:
10849 * linux-x86-64-low.c:
10850 * linux-sh-low.c:
10851 * linux-s390-low.c:
10852 * linux-ppc64-low.c:
10853 * linux-ppc-low.c:
10854 * linux-mips-low.c:
10855 * linux-m68k-low.c:
10856 * linux-m32r-low.c:
10857 * linux-low.h:
10858 * linux-low.c:
10859 * linux-ia64-low.c:
10860 * linux-i386-low.c:
10861 * linux-crisv32-low.c:
10862 * thread-db.c:
10863 * terminal.h:
10864 * target.h:
10865 * target.c:
10866 * server.h:
10867 * server.c:
10868 * remote-utils.c:
10869 * regcache.h:
10870 * utils.c:
10871 * Makefile.in:
10872 * configure.ac:
6f0f660e
EZ
10873 * gdbserver.1: Add (C) after Copyright. Update the FSF
10874 address.
10875
9d1fb177
DJ
108762005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10877
10878 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10879 (arm_breakpoint_at): Recognize both breakpoints.
10880 (the_low_target): Use the correct breakpoint instruction.
10881
011a70c2
DJ
108822005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10883
10884 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10885 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10886 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10887 (the_low_target): Update.
10888
7fb85e41
AS
108892005-10-25 Andreas Schwab <schwab@suse.de>
10890
10891 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10892
10893 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10894 (ia64_num_regs): Reduce to 462.
10895
3db0444b
DJ
108962005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10897
10898 * acinclude.m4: Correct quoting.
10899 * aclocal.m4: Regenerated.
10900
10901 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10902 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10903 (thread_db_init): Call thread_db_err_str.
10904 * configure.ac: Check for TD_VERSION.
10905 * config.in, configure: Regenerated.
10906
bee0189a
DJ
109072005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10908
10909 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10910
e9d25b98
DJ
109112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10914 is not available. Define HAVE_PTRACE_GETREGS if it is.
10915 * config.in, configure: Regenerated.
10916 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10917 * linux-i386-low.c, linux-m68k-low.c: Update to use
10918 HAVE_PTRACE_GETREGS.
10919 * linux-low.c (regsets_fetch_inferior_registers)
10920 (regsets_store_inferior_registers): Only return 0 if we processed
10921 GENERAL_REGS.
10922 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10923 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10924
a06660f7
DJ
109252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10926
10927 * inferiors.c (struct thread_info): Add gdb_id.
10928 (add_thread): Add gdb_id argument.
10929 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10930 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10931 calls to add_thread.
10932 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10933 * server.c (handle_query): Use thread_to_gdb_id.
10934 (handle_v_cont, main): Use gdb_id_to_thread_id.
10935 * server.h (add_thread): Update prototype.
10936 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10937 prototypes.
10938
5a1f5858
DJ
109392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10942 left-padded registers.
10943 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10944 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10945
e122f1f5
SE
109462005-07-01 Steve Ellcey <sje@cup.hp.com>
10947
10948 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10949 * configure: Regenerate.
10950 * config.in: Regenerate.
10951 * server.h (NEED_DECLARATION_STRERROR):
10952 Replace with !HAVE_DECL_STRERROR.
10953
d592fa2f
DJ
109542005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10955
10956 * linux-low.c (linux_wait, linux_send_signal): Don't test
10957 an unsigned long variable for > 0 if it could be MAX_ULONG.
10958 * server.c (myresume): Likewise.
10959 * target.c (set_desired_inferior): Likewise.
10960
ccbd4912
MK
109612005-06-13 Mark Kettenis <kettenis@gnu.org>
10962
10963 * configure.ac: Simplify and improve check for socklen_t.
10964 * configure, config.in: Regenerate.
10965
f450004a
DJ
109662005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10967
10968 * acconfig.h: Remove.
10969 * configure.ac: Add a test for socklen_t. Use three-argument
10970 AC_DEFINE throughout.
10971 * config.in: Regenerated using autoheader 2.59.
10972 * configure: Regenerated.
10973
10974 * gdbreplay.c (socklen_t): Provide a default.
10975 (remote_open): Use socklen_t.
10976 * remote-utils.c (socklen_t): Provide a default.
10977 (remote_open): Use socklen_t.
10978 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10979 unsigned char.
10980
10981 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10982 char for buffers.
10983 * linux-low.c (linux_read_memory, linux_write_memory)
10984 (linux_read_auxv): Likewise.
10985 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10986 (check_mem_write): Likewise.
10987 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10988 Likewise.
10989 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10990 (registers_from_string, register_data): Likewise.
10991 * server.c (handle_query, main): Likewise.
10992 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10993 (decode_M_packet): Likewise.
10994 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10995 * target.h (struct target_ops): Update read_memory, write_memory,
10996 and read_auxv.
10997 (read_inferior_memory, write_inferior_memory): Update.
10998 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10999 to unsigned char *.
11000 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11001 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11002 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11003 linux-s390-low.c, linux-sh-low.c: Update for changes in
11004 read_inferior_memory and the_low_target->breakpoint.
11005
eee84df1
DJ
110062005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11007
11008 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11009 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11010 * configure.srv: Add powerpc64-*-linux*.
11011 * linux-ppc64-low.c: New file.
11012
45b134e5
OF
110132005-05-23 Orjan Friberg <orjanf@axis.com>
11014
11015 * linux-cris-low.c: New file with support for CRIS.
11016 * linux-crisv32-low.c: Ditto for CRISv32.
11017 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11018 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11019 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11020 reg-crisv32.o, and reg-crisv32.c to make rules.
11021 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11022 recognized targets.
11023
48d93c75
UW
110242005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11025
11026 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11027 of sizeof (PTRACE_XFER_TYPE).
11028 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11029
e013ee27
OF
110302005-05-12 Orjan Friberg <orjanf@axis.com>
11031
889bf7c5 11032 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11033 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11034 pointers for hardware watchpoint support.
11035 * linux-low.h (struct linux_target_ops): Ditto.
11036 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11037 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11038 to linux_target_ops.
11039 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11040 reply packet.
11041 * server.c (main): Recognize 'Z' and 'z' packets.
11042
b0ded00b
UW
110432005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11044
11045 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11046 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11047 (the_low_target): Add new members.
11048
8643e2ad
DJ
110492005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * proc-service.c (ps_lgetregs): Search all_processes instead of
11052 all_threads.
11053
fc620387
DJ
110542005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * server.c (start_inferior): Change return type to int.
11057 (attach_inferior): Change sigptr to int *.
11058 (handle_v_cont, handle_v_requests): Change signal to int *.
11059 (main): Change signal to int.
11060
110612005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11062
11063 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11064 * configure.srv: Add m32r*-*-linux*.
11065 * linux-m32r-low.c: New file.
11066
e0e76420
DJ
110672005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11068
11069 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11070
a1928bad
DJ
110712005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11074 Take unsigned long arguments for PIDs.
11075 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11076 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11077 (wait_for_sigstop, linux_resume_one_process)
11078 (regsets_fetch_inferior_registers, linux_send_signal)
11079 (linux_read_auxv): Likewise. Update the types of variables holding
11080 PIDs. Update format string specifiers.
11081 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11082 * remote-utils.c (prepare_resume_reply): Likewise.
11083 * server.c (cont_thread, general_thread, step_thread)
11084 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11085 unsigned long.
11086 (handle_query): Update format specifiers.
11087 (handle_v_cont, main): Use strtoul for thread IDs.
11088 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11089 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11090 (general_thread, step_thread, thread_from_wait)
11091 (old_thread_from_wait): Update.
11092 * target.h (struct thread_resume): Use unsigned long for THREAD.
11093 (struct target_ops): Use unsigned long for arguments to attach and
11094 thread_alive.
11095
dcdb98d2
DJ
110962005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11097
11098 * acinclude.m4: Include bfd/bfd.m4 directly.
11099 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11100 <agriffis@toolchain.org>.
11101 * aclocal.m4, configure: Regenerated.
11102
bec39cab
AC
111032005-01-07 Andrew Cagney <cagney@gnu.org>
11104
11105 * configure.ac: Rename configure.in, require autoconf 2.59.
11106 * configure: Re-generate.
11107
434c4c77
DJ
111082004-12-08 Daniel Jacobowitz <dan@debian.org>
11109
11110 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11111 LIBS when finished.
11112 * aclocal.m4: Regenerated.
11113 * configure: Regenerated.
11114
db1d3e1b
AS
111152004-11-21 Andreas Schwab <schwab@suse.de>
11116
11117 * linux-m68k-low.c (m68k_num_gregs): Define.
11118 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11119 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11120 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11121 (m68k_breakpoint_at): New. Add to the_low_target.
11122
11123 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11124 srv_linux_thread_db to yes.
11125
43360365
JB
111262004-10-20 Joel Brobecker <brobecker@gnat.com>
11127
11128 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11129 (ARCH_SET_FS): Likewise.
11130 (ARCH_GET_FS): Likewise.
11131 (ARCH_GET_GS): Likewise.
11132
fd500816
DJ
111332004-10-16 Daniel Jacobowitz <dan@debian.org>
11134
11135 * linux-i386-low.c (ps_get_thread_area): New.
11136 * linux-x86-64-low.c (ps_get_thread_area): New.
11137 * linux-low.c: Include <sys/syscall.h>.
11138 (linux_kill_one_process): Don't kill the first thread here.
11139 (linux_kill): Kill the first thread here.
11140 (kill_lwp): New function.
11141 (send_sigstop, linux_send_signal): Use it.
11142 * proc-service.c: Clean up #ifdefs.
11143 (fpregset_info): Delete.
11144 (ps_lgetregs): Update and enable implementation.
11145 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11146 implementations.
11147 * remote-utils.c (struct sym_cache, symbol_cache): New.
11148 (input_interrupt): Print a clearer message.
11149 (async_io_enabled): New variable.
11150 (enable_async_io, disable_async_io): Use it. Update comments.
11151 (look_up_one_symbol): Use the symbol cache.
11152 * thread-db.c (thread_db_look_up_symbols): New function.
11153 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11154
f6de3c42
DJ
111552004-10-16 Daniel Jacobowitz <dan@debian.org>
11156
11157 * configure.in: Test for -rdynamic.
11158 * configure: Regenerated.
11159 * Makefile (INTERNAL_LDFLAGS): New.
11160 (gdbserver, gdbreplay): Use it.
11161
2c0fc042
AC
111622004-09-02 Andrew Cagney <cagney@gnu.org>
11163
11164 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11165
075b3282
DJ
111662004-03-23 Daniel Jacobowitz <drow@mvista.com>
11167
11168 * linux-low.c (linux_wait): Clear all_processes list also.
11169
fa6a77dc
DJ
111702004-03-12 Daniel Jacobowitz <drow@mvista.com>
11171
11172 * linux-low.c: Include <errno.h>. Remove extern declaration of
11173 errno.
11174
6d782a97
DJ
111752004-03-12 Daniel Jacobowitz <drow@mvista.com>
11176
11177 * gdbreplay.c, server.h, utils.c: Update copyright years.
11178
3a7fb99b
DJ
111792004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11180
11181 * server.c (main): Print child status or termination signal from
11182 variable 'signal', not 'sig'.
11183
c3e735a6
DJ
111842004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11185
11186 * linux-low.c (linux_read_memory): Change return type to
11187 int. Check for and return error from ptrace().
11188 * target.c (read_inferior_memory): Change return type to int. Pass
11189 back return status from the_target->read_memory().
11190 * target.h (struct target_ops): Adapt *read_memory() prototype.
11191 Update comment.
11192 (read_inferior_memory): Adapt prototype.
11193 * server.c (main): Return an error packet if
11194 read_inferior_memory() returns an error.
11195
a59d1c82
DJ
111962004-03-04 Daniel Jacobowitz <drow@mvista.com>
11197
11198 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11199 Unify with other clean targets.
11200
dc3f8883
DJ
112012004-02-29 Daniel Jacobowitz <drow@mvista.com>
11202
11203 * server.c (handle_v_cont): Call set_desired_inferior.
11204
89a208da
DJ
112052004-02-29 Daniel Jacobowitz <drow@mvista.com>
11206
11207 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11208
62ea82f5
DJ
112092004-02-29 Daniel Jacobowitz <drow@mvista.com>
11210
11211 * linux-low.c (linux_wait): Unblock async I/O.
11212 (linux_resume): Block and enable async I/O.
11213 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11214 * server.h (block_async_io, unblock_async_io): Add prototypes.
11215
6910d122
DJ
112162004-02-29 Daniel Jacobowitz <drow@mvista.com>
11217
11218 * remote-utils.c (remote_open): Print a status notice after
11219 opening a TCP port.
11220 * server.c (attach_inferior): Print a status notice after
11221 attaching.
11222
112232004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11224
11225 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11226
c89dc5d4
DJ
112272004-02-26 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11230 error packet.
11231 * server.c, target.h: Update copyright years.
11232
4b8dad4a
RM
112332004-02-25 Roland McGrath <roland@redhat.com>
11234
11235 * target.h (struct target_ops): New member `read_auxv'.
11236 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11237 * linux-low.c (linux_read_auxv): New function.
11238 (linux_target_ops): Initialize `read_auxv' member to that.
11239
d7446758
JB
112402004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11241
11242 Committed by Jim Blandy <jimb@redhat.com>.
11243
11244 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11245 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11246 instead of GPR_SIZE to distiguish s390 and s390x targets.
11247
5544ad89
DJ
112482004-01-31 Daniel Jacobowitz <drow@mvista.com>
11249
11250 * linux-low.c: Update copyright year.
11251 (check_removed_breakpoint): Clear pending_is_breakpoint.
11252 (linux_set_resume_request, linux_queue_one_thread)
11253 (resume_status_pending_p): New functions.
11254 (linux_continue_one_thread): Use process->resume.
11255 (linux_resume): Only resume threads if there are no pending events.
11256 * linux-low.h (struct process_info): Add resume request
11257 pointer.
11258
2a68b70e
DJ
112592004-01-30 Daniel Jacobowitz <drow@mvista.com>
11260
11261 * regcache.c (new_register_cache): Clear the allocated register
11262 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11263
64386c31
DJ
112642003-10-13 Daniel Jacobowitz <drow@mvista.com>
11265
11266 * linux-low.c (linux_resume): Take a struct thread_resume *
11267 argument.
11268 (linux_wait): Update call.
11269 (resume_ptr): New static variable.
11270 (linux_continue_one_thread): Renamed from
11271 linux_continue_one_process. Use resume_ptr.
11272 (linux_resume): Use linux_continue_one_thread.
11273 * server.c (handle_v_cont, handle_v_requests): New functions.
11274 (myresume): New function.
11275 (main): Handle 'v' case.
11276 * target.h (struct thread_resume): New type.
11277 (struct target_ops): Change argument of "resume" to struct
11278 thread_resume *.
11279 (myresume): Delete macro.
11280
c938e9b0
L
112812003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11282
11283 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11284 (uninstall): Support DESTDIR.
11285
7f313d07
BC
11286Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11287
11288 * configure.srv: Add xscale*linux copy of arm*linux entry.
11289
3b2fc2ea
DJ
112902003-07-24 Daniel Jacobowitz <drow@mvista.com>
11291
11292 * linux-arm-low.c (arm_reinsert_addr): New function.
11293 (the_low_target): Add arm_reinsert_addr.
11294
1c0a559e
MK
112952003-07-08 Mark Kettenis <kettenis@gnu.org>
11296
11297 * mem-break.c: Remove whitespace at end of file.
11298
43d5792c
DJ
112992003-06-28 Daniel Jacobowitz <drow@mvista.com>
11300
11301 * configure.in: Check whether we need to prototype strerror.
11302 * server.h: Optionally prototype strerror.
11303 * gdbreplay.c (perror_with_name): Use strerror.
11304 * linux-low.c (linux_attach_lwp): Use strerror.
11305 * utils.c (perror_with_name): Use strerror.
11306 * config.in, configure: Regenerated.
11307
c8a86edf
DJ
113082003-06-28 Daniel Jacobowitz <drow@mvista.com>
11309
11310 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11311 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11312
73d37363
DJ
113132003-06-20 Daniel Jacobowitz <drow@mvista.com>
11314
11315 * Makefile.in (SFILES): Update.
11316 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11317 low-sun3.c: Remove files.
11318
6ad8ae5c
DJ
113192003-06-17 Daniel Jacobowitz <drow@mvista.com>
11320
11321 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11322 (linux_detach_one_process, linux_detach): New functions.
11323 (linux_target_ops): Add linux_detach.
11324 * server.c (main): Handle 'D' packet.
11325 * target.h (struct target_ops): Add "detach" member.
11326 (detach_inferior): Define.
11327
1581182a
MK
113282003-06-13 Mark Kettenis <kettenis@gnu.org>
11329
11330 From Kelley Cook <kelleycook@wideopenwest.com>:
11331 * configure.srv: Accept i[34567]86 variants.
11332
e5379b03
DJ
113332003-06-05 Daniel Jacobowitz <drow@mvista.com>
11334
11335 * linux-low.c (linux_wait_for_event): Correct comment typos.
11336 (linux_resume_one_process): Call check_removed_breakpoint.
11337 (linux_send_signal): New function.
11338 (linux_target_ops): Add linux_send_signal.
11339 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11340 of kill.
11341 * target.h (struct target_ops): Add send_signal.
11342
2ff29de4
JB
113432003-05-29 Jim Blandy <jimb@redhat.com>
11344
11345 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11346 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11347 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11348 away part of the register's value.
11349
254787d4
DJ
113502003-03-26 Daniel Jacobowitz <drow@mvista.com>
11351
11352 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11353 (linux_wait_for_event, linux_init_signals): Likewise.
11354
94e10508
DJ
113552003-03-17 Daniel Jacobowitz <drow@mvista.com>
11356
11357 * configure.in: Check for stdlib.h.
11358 * configure: Regenerated.
11359 * config.in: Regenerated.
11360
4c0711e0
DJ
113612003-01-04 Andreas Schwab <schwab@suse.de>
11362
11363 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11364
ef66e766
AC
113652003-01-02 Andrew Cagney <ac131313@redhat.com>
11366
11367 * Makefile.in: Remove obsolete code.
11368
a1358604
DJ
113692002-11-20 Daniel Jacobowitz <drow@mvista.com>
11370
11371 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11372 defined(PT_FPR0_HI).
11373
23ce3b1c
DJ
113742002-11-17 Stuart Hughes <seh@zee2.com>
11375
11376 * linux-arm-low.c (arm_num_regs): Increase.
11377 (arm_regmap): Include status register.
11378
113792002-11-17 Daniel Jacobowitz <drow@mvista.com>
11380
11381 * linux-low.c (register_addr): Remove incorrect -1 check.
11382
a9fa9f7d
DJ
113832002-08-29 Daniel Jacobowitz <drow@mvista.com>
11384
11385 * linux-low.c (linux_create_inferior): Call setpgid. Return
11386 the new PID.
11387 (unstopped_p, linux_signal_pid): Remove.
11388 (linux_target_ops): Remove linux_signal_pid.
11389 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11390 global instead of target method.
11391 * target.h (struct target_ops): Remove signal_pid. Update comment
11392 for create_inferior.
11393 * server.c (signal_pid): New variable.
11394 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11395 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11396 (attach_inferior): Set signal_pid.
11397
17574093
DJ
113982002-08-23 Daniel Jacobowitz <drow@mvista.com>
11399
11400 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11401
114022002-08-20 Jim Blandy <jimb@redhat.com>
11403
11404 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11405 default for this.
11406
114072002-08-01 Andrew Cagney <cagney@redhat.com>
11408
11409 * Makefile.in: Make chill references obsolete.
11410
114112002-07-24 Kevin Buettner <kevinb@redhat.com>
11412
11413 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11414 * configure: Regenerate.
11415 * config.in: Regenerate.
11416
114172002-07-09 David O'Brien <obrien@FreeBSD.org>
11418
11419 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11420 (perror_with_name, remote_close, remote_open, expect, play): Static.
11421
114222002-07-04 Michal Ludvig <mludvig@suse.cz>
11423
4b8dad4a 11424 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11425 byte offsets instead of an array of indexes.
11426 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11427
114282002-06-13 Daniel Jacobowitz <drow@mvista.com>
11429
11430 * regcache.c: Add comment.
11431
114322002-06-11 Daniel Jacobowitz <drow@mvista.com>
11433
11434 * thread-db.c: New file.
11435 * proc-service.c: New file.
11436 * acinclude.m4: New file.
11437 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11438 proc-service.o, and thread-db.o.
11439 (linux-low.o): Add USE_THREAD_DB.
11440 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11441 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11442 * aclocal.m4: Regenerated.
11443 * config.in: Regenerated.
11444 * configure: Regenerated.
11445 * configure.in: Check for proc_service.h, sys/procfs.h,
11446 thread_db.h, and linux/elf.h headrs.
11447 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11448 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11449 Check for -lthread_db and thread support.
11450 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11451 PowerPC, and SuperH.
11452 * i387-fp.c: Constify arguments.
11453 * i387-fp.h: Likewise.
11454 * inferiors.c: (struct thread_info): Renamed from
11455 `struct inferior_info'. Remove PID member. Use generic inferior
11456 list header. All uses updated.
11457 (inferiors, signal_pid): Removed.
11458 (all_threads): New variable.
11459 (get_thread): Define.
11460 (add_inferior_to_list): New function.
11461 (for_each_inferior): New function.
11462 (change_inferior_id): New function.
11463 (add_inferior): Removed.
11464 (remove_inferior): New function.
11465 (add_thread): New function.
11466 (free_one_thread): New function.
11467 (remove_thread): New function.
11468 (clear_inferiors): Use for_each_inferior and free_one_thread.
11469 (find_inferior): New function.
11470 (find_inferior_id): New function.
11471 (inferior_target_data): Update argument type.
11472 (set_inferior_target_data): Likewise.
11473 (inferior_regcache_data): Likewise.
11474 (set_inferior_regcache_data): Likewise.
11475 * linux-low.c (linux_bp_reinsert): Remove.
11476 (all_processes, stopping_threads, using_thrads)
11477 (struct pending_signals, debug_threads, pid_of): New.
11478 (inferior_pid): Replace with macro.
11479 (struct inferior_linux_data): Remove.
11480 (get_stop_pc, add_process): New functions.
11481 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11482 Use add_process and add_thread.
11483 (linux_attach_lwp): New function, based on old linux_attach. Use
11484 add_process and add_thread. Set stop_expected for new threads.
11485 (linux_attach): New function.
11486 (linux_kill_one_process): New function.
11487 (linux_kill): Kill all LWPs.
11488 (linux_thread_alive): Use find_inferior_id.
11489 (check_removed_breakpoints, status_pending_p): New functions.
11490 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11491 Update. Use WNOHANG. Wait for cloned processes also. Update process
11492 struct for the found process.
11493 (linux_wait_for_event): New function.
11494 (linux_wait): Use it. Support LWPs.
11495 (send_sigstop, wait_for_sigstop, stop_all_processes)
11496 (linux_resume_one_process, linux_continue_one_process): New functions.
11497 (linux_resume): Support LWPs.
11498 (REGISTER_RAW_SIZE): Remove.
11499 (fetch_register): Use register_size instead. Call supply_register.
11500 (usr_store_inferior_registers): Likewise. Call collect_register.
11501 Fix recursive case.
11502 (regsets_fetch_inferior_registers): Improve error message.
11503 (regsets_store_inferior_registers): Add debugging.
11504 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11505 (unstopped_p, linux_signal_pid): New functions.
11506 (linux_target_ops): Add linux_signal_pid.
11507 (linux_init_signals): New function.
11508 (initialize_low): Call it. Initialize using_threads.
11509 * regcache.c (inferior_regcache_data): Add valid
11510 flag.
11511 (get_regcache): Fetch registers lazily. Add fetch argument
11512 and update all callers.
11513 (regcache_invalidate_one, regcache_invalidate): New
11514 functions.
11515 (new_register_cache): Renamed from create_register_cache.
11516 Return the new regcache.
11517 (free_register_cache): Change argument to a void *.
11518 (registers_to_string, registers_from_string): Call get_regcache
11519 with fetch flag set.
11520 (register_data): Make static. Pass fetch flag to get_regcache.
11521 (supply_register): Call get_regcache with fetch flag clear.
11522 (collect_register): Call get_regcache with fetch flag set.
11523 (collect_register_as_string): New function.
11524 * regcache.h: Update.
11525 * remote-utils.c (putpkt): Flush after debug output and use
11526 stderr.
11527 Handle input interrupts while waiting for an ACK.
11528 (input_interrupt): Use signal_pid method.
11529 (getpkt): Flush after debug output and use stderr.
11530 (outreg): Use collect_register_as_string.
11531 (new_thread_notify, dead_thread_notify): New functions.
11532 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11533 and general_thread.
11534 (look_up_one_symbol): Flush after debug output.
11535 * server.c (step_thread, server_waiting): New variables.
11536 (start_inferior): Don't use signal_pid. Update call to mywait.
11537 (attach_inferior): Update call to mywait.
11538 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11539 (main): Don't fetch/store registers explicitly. Use
11540 set_desired_inferior. Support proposed ``Hs'' packet. Update
11541 calls to mywait.
11542 * server.h: Update.
11543 (struct inferior_list, struct_inferior_list_entry): New.
11544 * target.c (set_desired_inferior): New.
11545 (write_inferior_memory): Constify.
11546 (mywait): New function.
11547 * target.h: Update.
11548 (struct target_ops): New signal_pid method.
11549 (mywait): Removed macro, added prototype.
11550
11551 * linux-low.h (regset_func): Removed.
11552 (regset_fill_func, regset_store_func): New.
11553 (enum regset_type): New.
11554 (struct regset_info): Add type field. Use new operation types.
11555 (struct linux_target_ops): stop_pc renamed to get_pc.
11556 Add decr_pc_after_break and breakpoint_at.
11557 (get_process, get_thread_proess, get_process_thread)
11558 (strut process_info, all_processes, linux_attach_lwp)
11559 (thread_db_init): New.
11560
11561 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11562 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11563 (the_low_target): Add new members.
11564 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11565 (i386_store_fpxregset): Constify.
11566 (target_regsets): Add new kind identifier.
11567 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11568 (i386_set_pc): Add debugging.
11569 (i386_breakpoint_at): New function.
11570 (the_low_target): Add new members.
11571 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11572 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11573 (mips_breakpoint_at): New.
11574 (the_low_target): Add new members.
11575 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11576 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11577 (the_low_target): Add new members.
11578 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11579 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11580 (the_low_target): Add new members.
11581 * linux-x86-64-low.c (target_regsets): Add new kind
11582 identifier.
11583
115842002-05-15 Daniel Jacobowitz <drow@mvista.com>
11585
11586 From Martin Pool <mbp@samba.org>:
11587 * server.c (gdbserver_usage): New function.
11588 (main): Call it.
11589
115902002-05-14 Daniel Jacobowitz <drow@mvista.com>
11591
11592 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11593 stop_at -> stop_pc.
11594
115952002-05-04 Andrew Cagney <ac131313@redhat.com>
11596
11597 * Makefile.in: Remove obsolete code.
11598
115992002-04-24 Michal Ludvig <mludvig@suse.cz>
11600
11601 * linux-low.c (regsets_fetch_inferior_registers),
11602 (regsets_store_inferior_registers): Removed cast to int from
11603 ptrace() calls.
11604 * regcache.h: Added declaration of struct inferior_info.
11605
116062002-04-20 Daniel Jacobowitz <drow@mvista.com>
11607
11608 * inferiors.c (struct inferior_info): Add regcache_data.
11609 (add_inferior): Call create_register_cache.
11610 (clear_inferiors): Call free_register_cache.
11611 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11612 * regcache.c (struct inferior_regcache_data): New.
11613 (registers): Remove.
11614 (get_regcache): New function.
11615 (create_register_cache, free_register_cache): New functions.
11616 (set_register_cache): Don't initialize the register cache here.
11617 (registers_to_string, registers_from_string, register_data): Call
11618 get_regcache.
11619 * regcache.h: Add prototypes.
11620 * server.h: Likewise.
11621
116222002-04-20 Daniel Jacobowitz <drow@mvista.com>
11623
11624 * mem-break.c: New file.
11625 * mem-break.h: New file.
11626 * Makefile.in: Add mem-break.o rule; update server.h
11627 dependencies.
11628 * inferiors.c (struct inferior_info): Add target_data
11629 member.
11630 (clear_inferiors): Free target_data member if set.
11631 (inferior_target_data, set_inferior_target_data): New functions.
11632 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11633 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11634 * linux-low.c (linux_bp_reinsert): New variable.
11635 (struct inferior_linux_data): New.
11636 (linux_create_inferior): Use set_inferior_target_data.
11637 (linux_attach): Likewise. Call add_inferior.
11638 (linux_wait_for_one_inferior): New function.
11639 (linux_wait): Call it.
11640 (linux_write_memory): Add const.
11641 (initialize_low): Call set_breakpoint_data.
11642 * linux-low.h (struct linux_target_ops): Add breakpoint
11643 handling members.
11644 * server.c (attach_inferior): Remove extra add_inferior
11645 call.
11646 * server.h: Include mem-break.h. Update inferior.c
11647 prototypes.
11648 * target.c (read_inferior_memory)
11649 (write_inferior_memory): New functions.
11650 * target.h (read_inferior_memory)
11651 (write_inferior_memory): Change macros to prototypes.
11652 (struct target_ops): Update comments. Add const to write_memory
11653 definition.
11654
116552002-04-11 Daniel Jacobowitz <drow@mvista.com>
11656
11657 * linux-low.c (usr_store_inferior_registers): Support
11658 registers which are allowed to fail to store.
11659 * linux-low.h (linux_target_ops): Likewise.
11660 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11661 (ppc_cannot_store_register): FPSCR may not be storable.
11662
116632002-04-09 Daniel Jacobowitz <drow@mvista.com>
11664
11665 * server.h: Include <string.h> if HAVE_STRING_H.
11666 * ChangeLog: Correct paths in last ChangeLog entry.
11667
116682002-04-09 Daniel Jacobowitz <drow@mvista.com>
11669
11670 * linux-low.h: Remove obsolete prototypes.
11671 (struct linux_target_ops): New.
11672 (extern the_low_target): New.
11673 * linux-low.c (num_regs, regmap): Remove declarations.
11674 (register_addr): Use the_low_target explicitly.
11675 (fetch_register): Likewise.
11676 (usr_fetch_inferior_registers): Likewise.
11677 (usr_store_inferior_registers): Likewise.
11678 * linux-arm-low.c (num_regs): Remove.
11679 (arm_num_regs): Define.
11680 (arm_regmap): Renamed from regmap, made static.
11681 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11682 made static.
11683 (arm_cannot_store_register): Renamed from cannot_store_register,
11684 made static.
11685 (the_low_target): New.
11686 * linux-i386-low.c (num_regs): Remove.
11687 (i386_num_regs): Define.
11688 (i386_regmap): Renamed from regmap, made static.
11689 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11690 made static.
11691 (i386_cannot_store_register): Renamed from cannot_store_register,
11692 made static.
11693 (the_low_target): New.
11694 * linux-ia64-low.c (num_regs): Remove.
11695 (ia64_num_regs): Define.
11696 (ia64_regmap): Renamed from regmap, made static.
11697 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11698 made static.
11699 (ia64_cannot_store_register): Renamed from cannot_store_register,
11700 made static.
11701 (the_low_target): New.
11702 * linux-m68k-low.c (num_regs): Remove.
11703 (m68k_num_regs): Define.
11704 (m68k_regmap): Renamed from regmap, made static.
11705 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11706 made static.
11707 (m68k_cannot_store_register): Renamed from cannot_store_register,
11708 made static.
11709 (the_low_target): New.
11710 * linux-mips-low.c (num_regs): Remove.
11711 (mips_num_regs): Define.
11712 (mips_regmap): Renamed from regmap, made static.
11713 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11714 made static.
11715 (mips_cannot_store_register): Renamed from cannot_store_register,
11716 made static.
11717 (the_low_target): New.
11718 * linux-ppc-low.c (num_regs): Remove.
11719 (ppc_num_regs): Define.
11720 (ppc_regmap): Renamed from regmap, made static.
11721 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11722 made static.
11723 (ppc_cannot_store_register): Renamed from cannot_store_register,
11724 made static.
11725 (the_low_target): New.
11726 * linux-s390-low.c (num_regs): Remove.
11727 (s390_num_regs): Define.
11728 (s390_regmap): Renamed from regmap, made static.
11729 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11730 made static.
11731 (s390_cannot_store_register): Renamed from cannot_store_register,
11732 made static.
11733 (the_low_target): New.
11734 * linux-sh-low.c (num_regs): Remove.
11735 (sh_num_regs): Define.
11736 (sh_regmap): Renamed from regmap, made static.
11737 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11738 made static.
11739 (sh_cannot_store_register): Renamed from cannot_store_register,
11740 made static.
11741 (the_low_target): New.
11742 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11743 (the_low_target): New.
11744
117452002-04-09 Daniel Jacobowitz <drow@mvista.com>
11746
11747 * Makefile.in: Add stamp-h target.
11748 * configure.in: Create stamp-h.
11749 * configure: Regenerated.
11750
117512002-04-09 Daniel Jacobowitz <drow@mvista.com>
11752
11753 * inferiors.c: New file.
11754 * target.c: New file.
11755 * target.h: New file.
11756 * Makefile.in: Add target.o and inferiors.o. Update
11757 dependencies.
11758 * linux-low.c (inferior_pid): New static variable,
11759 moved from server.c.
11760 (linux_create_inferior): Renamed from create_inferior.
11761 Call add_inferior. Return 0 on success instead of a PID.
11762 (linux_attach): Renamed from myattach.
11763 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11764 (linux_thread_alive): Renamed from mythread_alive.
11765 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11766 child dies.
11767 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11768 (regsets_store_inferior_registers): Correct error message.
11769 Add missing ``return 0''.
11770 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11771 (linux_store_registers): Renamed from store_inferior_registers.
11772 (linux_read_memory): Renamed from read_inferior_memory.
11773 (linux_write_memory): Renamed from write_inferior_memory.
11774 (linux_target_ops): New structure.
11775 (initialize_low): Call set_target_ops ().
11776 * remote-utils.c (unhexify): New function.
11777 (hexify): New function.
11778 (input_interrupt): Send signals to ``signal_pid''.
11779 * server.c (inferior_pid): Remove.
11780 (start_inferior): Update create_inferior call.
11781 (attach_inferior): Call add_inferior.
11782 (handle_query): New function.
11783 (main): Call handle_query for `q' packets.
11784 * server.h: Include "target.h". Remove obsolete prototypes.
11785 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11786
117872002-04-09 Daniel Jacobowitz <drow@mvista.com>
11788
11789 * Makefile.in: Add WARN_CFLAGS. Update configury
11790 dependencies.
11791 * configure.in: Check for <string.h>
11792 * configure: Regenerate.
11793 * config.in: Regenerate.
11794 * gdbreplay.c: Include needed system headers.
11795 (remote_open): Remove strchr prototype.
11796 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11797 * regcache.c (supply_register): Change buf argument to const void *.
11798 (supply_register_by_name): Likewise.
11799 (collect_register): Change buf argument to void *.
11800 (collect_register_by_name): Likewise.
11801 * regcache.h: Add missing prototypes.
11802 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11803 * server.c (handle_query): New function.
11804 (attached): New static variable, moved out of main.
11805 (main): Quiet longjmp clobber warnings.
11806 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11807 * utils.c (error): Remove NORETURN.
11808 (fatal): Likewise.