1 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3 Fix TLS access for -static -pthread.
4 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8 2014-05-20 Pedro Alves <palves@redhat.com>
10 * linux-aarch64-low.c (aarch64_insert_point)
11 (aarch64_remove_point): No longer check whether the type is
12 supported here. Adjust to new interface.
13 (the_low_target): Install aarch64_supports_z_point_type as
14 supports_z_point_type method.
15 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
16 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
17 instead of a Z packet char. Adjust.
18 (arm_supports_z_point_type): New function.
19 (arm_insert_point, arm_remove_point): Adjust to new interface.
20 (the_low_target): Install arm_supports_z_point_type.
21 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
22 (cris_insert_point, cris_remove_point): Adjust to new interface.
23 Don't check whether the type is supported here.
24 (the_low_target): Install cris_supports_z_point_type.
25 * linux-low.c (linux_supports_z_point_type): New function.
26 (linux_insert_point, linux_remove_point): Adjust to new interface.
27 * linux-low.h (struct linux_target_ops) <insert_point,
28 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
29 raw_breakpoint pointer parameter.
30 <supports_z_point_type>: New method.
31 * linux-mips-low.c (mips_supports_z_point_type): New function.
32 (mips_insert_point, mips_remove_point): Adjust to new interface.
33 Use mips_supports_z_point_type.
34 (the_low_target): Install mips_supports_z_point_type.
35 * linux-ppc-low.c (the_low_target): Install NULL as
36 supports_z_point_type method.
37 * linux-s390-low.c (the_low_target): Install NULL as
38 supports_z_point_type method.
39 * linux-sparc-low.c (the_low_target): Install NULL as
40 supports_z_point_type method.
41 * linux-x86-low.c (x86_supports_z_point_type): New function.
42 (x86_insert_point): Adjust to new insert_point interface. Use
43 insert_memory_breakpoint. Adjust to new
44 i386_low_insert_watchpoint interface.
45 (x86_remove_point): Adjust to remove_point interface. Use
46 remove_memory_breakpoint. Adjust to new
47 i386_low_remove_watchpoint interface.
48 (the_low_target): Install x86_supports_z_point_type.
49 * lynx-low.c (lynx_target_ops): Install NULL as
50 supports_z_point_type callback.
51 * nto-low.c (nto_supports_z_point_type): New.
52 (nto_insert_point, nto_remove_point): Adjust to new interface.
53 (nto_target_ops): Install nto_supports_z_point_type.
54 * mem-break.c: Adjust intro comment.
55 (struct raw_breakpoint) <raw_type, size>: New fields.
56 <inserted>: Update comment.
57 <shlib_disabled>: Delete field.
58 (enum bkpt_type) <gdb_breakpoint>: Delete value.
59 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
60 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
61 (raw_bkpt_type_to_target_hw_bp_type): New function.
62 (find_enabled_raw_code_breakpoint_at): New function.
63 (find_raw_breakpoint_at): New type and size parameters. Use them.
64 (insert_memory_breakpoint): New function, based off
65 set_raw_breakpoint_at.
66 (remove_memory_breakpoint): New function.
67 (set_raw_breakpoint_at): Reimplement.
68 (set_breakpoint): New, based on set_breakpoint_at.
69 (set_breakpoint_at): Reimplement.
70 (delete_raw_breakpoint): Go through the_target->remove_point
71 instead of assuming memory breakpoints.
72 (find_gdb_breakpoint_at): Delete.
73 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
74 (find_gdb_breakpoint): New function.
75 (set_gdb_breakpoint_at): Delete.
76 (z_type_supported): New function.
77 (set_gdb_breakpoint_1): New function, loosely based off
78 set_gdb_breakpoint_at.
79 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
80 (delete_gdb_breakpoint_at): Delete.
81 (delete_gdb_breakpoint_1): New function, loosely based off
82 delete_gdb_breakpoint_at.
83 (delete_gdb_breakpoint): New function.
84 (clear_gdb_breakpoint_conditions): Rename to ...
85 (clear_breakpoint_conditions): ... this. Don't handle a NULL
87 (add_condition_to_breakpoint): Make static.
88 (add_breakpoint_condition): Take a struct breakpoint pointer
89 instead of an address. Adjust.
90 (gdb_condition_true_at_breakpoint): Rename to ...
91 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
93 (gdb_condition_true_at_breakpoint): Reimplement.
94 (add_breakpoint_commands): Take a struct breakpoint pointer
95 instead of an address. Adjust.
96 (gdb_no_commands_at_breakpoint): Rename to ...
97 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
98 parameter. Return true if no breakpoint was found. Change debug
100 (gdb_no_commands_at_breakpoint): Reimplement.
101 (run_breakpoint_commands): Rename to ...
102 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
103 and change return type to boolean.
104 (run_breakpoint_commands): New function.
105 (gdb_breakpoint_here): Also check for Z1 breakpoints.
106 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
107 breakpoint. Go through the_target->remove_point instead of
108 assuming memory breakpoint.
109 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
110 software and hardware breakpoints.
111 (reinsert_raw_breakpoint): Go through the_target->insert_point
112 instead of assuming memory breakpoint.
113 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
114 software and hardware breakpoints.
115 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
116 Check both software and hardware breakpoints.
117 (validate_inserted_breakpoint): Assert the breakpoint is a
118 software breakpoint. Set the inserted flag to -1 instead of
119 setting shlib_disabled.
120 (delete_disabled_breakpoints): Adjust.
121 (validate_breakpoints): Only validate software breakpoints.
122 Adjust to inserted flag change.
123 (check_mem_read, check_mem_write): Skip breakpoint types other
124 than software breakpoints. Adjust to inserted flag change.
125 * mem-break.h (enum raw_bkpt_type): New enum.
126 (raw_breakpoint, struct process_info): Forward declare.
127 (Z_packet_to_target_hw_bp_type): Delete declaration.
128 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
129 (set_gdb_breakpoint, delete_gdb_breakpoint)
130 (clear_breakpoint_conditions): New declarations.
131 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
132 (breakpoint_inserted_here): Update comment.
133 (add_breakpoint_condition, add_breakpoint_commands): Replace
134 address parameter with a breakpoint pointer parameter.
135 (gdb_breakpoint_here): Update comment.
136 (delete_gdb_breakpoint_at): Delete.
137 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
138 * server.c (process_point_options): Take a struct breakpoint
139 pointer instead of an address. Adjust.
140 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
141 delete_gdb_breakpoint.
142 * spu-low.c (spu_target_ops): Install NULL as
143 supports_z_point_type method.
144 * target.h: Include mem-break.h.
145 (struct target_ops) <prepare_to_access_memory>: Update comment.
146 <supports_z_point_type>: New field.
147 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
148 instead of a char. Also take a raw breakpoint pointer.
149 * win32-arm-low.c (the_low_target): Install NULL as
150 supports_z_point_type.
151 * win32-i386-low.c (i386_supports_z_point_type): New function.
152 (i386_insert_point, i386_remove_point): Adjust to new interface.
153 (the_low_target): Install i386_supports_z_point_type.
154 * win32-low.c (win32_supports_z_point_type): New function.
155 (win32_insert_point, win32_remove_point): Adjust to new interface.
156 (win32_target_ops): Install win32_supports_z_point_type.
157 * win32-low.h (struct win32_target_ops):
158 <supports_z_point_type>: New method.
159 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
160 instead of a char. Also take a raw breakpoint pointer.
162 2014-05-20 Pedro Alves <palves@redhat.com>
164 * mem-break.h: Include break-common.h.
165 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
166 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
167 (Z_packet_to_target_hw_bp_type): New declaration.
168 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
169 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
170 (Z_PACKET_ACCESS_WP): Delete macros.
171 (Z_packet_to_hw_type): Delete function.
172 * i386-low.h: Don't include break-common.h here.
173 (Z_packet_to_hw_type): Delete declaration.
174 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
175 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
176 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
177 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
178 * linux-aarch64-low.c: Don't include break-common.h here.
179 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
180 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
181 (Z_packet_to_target_hw_bp_type): Delete function.
182 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
184 (mips_insert_point, mips_remove_point): Use
185 Z_packet_to_target_hw_bp_type.
187 2014-05-20 Pedro Alves <palves@redhat.com>
189 * linux-aarch64-low.c: Include break-common.h.
190 (enum target_point_type): Delete.
191 (Z_packet_to_point_type): Rename to ...
192 (Z_packet_to_target_hw_bp_type): ... this, and return a
193 target_hw_bp_type instead.
194 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
195 instead of an enum target_point_type.
196 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
198 (aarch64_dr_state_insert_one_point)
199 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
200 (aarch64_handle_aligned_watchpoint)
201 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
202 Take an enum target_hw_bp_type instead of an enum
204 (aarch64_supports_z_point_type): New function.
205 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
206 use Z_packet_to_target_hw_bp_type.
208 2014-05-20 Joel Brobecker <brobecker@adacore.com>
210 * configure.ac: Only use -Werror by default when DEVELOPMENT
212 * configure: Regenerate.
214 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
216 Fix gdbserver qGetTLSAddr for x86_64 -m32.
217 * linux-x86-low.c (X86_64_USER_REGS): New.
218 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
220 2014-04-28 Yao Qi <yao@codesourcery.com>
222 * Makefile.in (i386-avx512.c): Fix the typo of generated file
225 2014-04-25 Pedro Alves <palves@redhat.com>
228 * linux-low.c (linux_attach_fail_reason_string): New function.
229 (linux_attach_lwp): Delete.
230 (linux_attach_lwp_1): Rename to ...
231 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
232 argument. Remove "initial" parameter. Return int instead of
233 void. Don't error or warn here.
234 (linux_attach): Adjust to call linux_attach_lwp. Call error on
235 failure to attach to the tgid. Call warning when failing to
237 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
238 argument. Remove "initial" parameter. Return int instead of
239 void. Don't error or warn here.
240 (linux_attach_fail_reason_string): New declaration.
241 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
242 interface change. Use linux_attach_fail_reason_string.
244 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
245 Walfred Tedeschi <walfred.tedeschi@intel.com>
247 * Makefile.in: Added rules to handle new files
248 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
249 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
250 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
251 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
252 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
253 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
255 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
256 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
257 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
259 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
260 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
261 i386/x32-avx512-linux.xml.
262 * i387-fp.c (num_avx512_k_registers): New constant for number
264 (num_avx512_zmmh_low_registers): New constant for number of
265 lower ZMM registers (0-15).
266 (num_avx512_zmmh_high_registers): New constant for number of
267 higher ZMM registers (16-31).
268 (num_avx512_ymmh_registers): New contant for number of higher
269 YMM registers (ymm16-31 added by avx521 on x86_64).
270 (num_avx512_xmm_registers): New constant for number of higher
271 XMM registers (xmm16-31 added by AVX512 on x86_64).
272 (struct i387_xsave): Add space for AVX512 registers.
273 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
274 Add code to handle AVX512 registers.
275 (i387_xsave_to_cache): Add code to handle AVX512 registers.
276 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
277 prototypei from generated file.
278 (tdesc_amd64_avx512_linux): Likewise.
279 (init_registers_x32_avx512_linux): Likewise.
280 (tdesc_x32_avx512_linux): Likewise.
281 (init_registers_i386_avx512_linux): Likewise.
282 (tdesc_i386_avx512_linux): Likewise.
283 (x86_64_regmap): Add AVX512 registers.
284 (x86_linux_read_description): Add code to handle AVX512 XSTATE
286 (initialize_low_arch): Add code to initialize AVX512 registers.
288 2014-04-23 Pedro Alves <palves@redhat.com>
290 * mem-break.c (find_gdb_breakpoint_at): Make static.
291 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
293 2014-04-23 Pedro Alves <palves@redhat.com>
295 * i386-low.c: Don't include break-common.h here.
296 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
297 prototype to take target_hw_bp_type as argument instead of a Z
299 * i386-low.h: Include break-common.h here.
300 (Z_packet_to_hw_type): Declare.
301 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
303 * linux-x86-low.c (x86_insert_point): Convert the packet number to
304 a target_hw_bp_type before calling i386_low_insert_watchpoint.
305 (x86_remove_point): Convert the packet number to a
306 target_hw_bp_type before calling i386_low_remove_watchpoint.
307 * win32-i386-low.c (i386_insert_point): Convert the packet number
308 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
309 (i386_remove_point): Convert the packet number to a
310 target_hw_bp_type before calling i386_low_remove_watchpoint.
312 2014-04-23 Pedro Alves <palves@redhat.com>
314 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
316 2014-04-10 Pedro Alves <palves@redhat.com>
318 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
319 Check if the condition or command is NULL before checking if the
320 breakpoint is known. On success, return true.
321 * mem-break.h (add_breakpoint_condition): Document return.
322 (add_breakpoint_commands): Add describing comment.
323 * server.c (skip_to_semicolon): New function.
324 (process_point_options): Use it.
326 2014-04-09 Pedro Alves <palves@redhat.com>
328 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
331 2014-02-27 Pedro Alves <palves@redhat.com>
334 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
336 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
338 (last_thread_of_process_p): Take a PID argument instead of a
340 (linux_wait_for_lwp): Delete.
341 (num_lwps, check_zombie_leaders, not_stopped_callback): New
343 (linux_low_filter_event): New function, party factored out from
344 linux_wait_for_event.
345 (linux_wait_for_event): Rename to ...
346 (linux_wait_for_event_filtered): ... this. Add new filter ptid
347 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
348 sigsuspend. Check for zombie leaders.
349 (linux_wait_for_event): Reimplement as wrapper around
350 linux_wait_for_event_filtered.
351 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
352 a normal or signal exit is seen, it's the whole process exiting.
353 (wait_for_sigstop): No longer a for_each_inferior callback.
354 Rewrite on top of linux_wait_for_event_filtered.
355 (stop_all_lwps): Call wait_for_sigstop directly.
356 * server.c (resume, handle_target_event): Handle
357 TARGET_WAITKIND_NO_RESUMED.
359 2014-02-26 Joel Brobecker <brobecker@adacore.com>
361 * win32-low.c (psapi_get_dll_name,
362 * win32_CreateToolhelp32Snapshot): Delete.
363 (win32_CreateToolhelp32Snapshot, win32_Module32First)
364 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
366 (handle_load_dll): Add function description.
367 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
369 2014-02-26 Joel Brobecker <brobecker@adacore.com>
371 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
373 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
374 base address when calling win32_add_one_solib.
375 (handle_load_dll): Delete local variable load_addr.
376 Remove 0x1000 offset applied to DLL base address when calling
378 (handle_unload_dll): Add comment.
380 2014-02-26 Joel Brobecker <brobecker@adacore.com>
382 * win32-low.c (win32_add_all_dlls): Renames
383 win32_ensure_ntdll_loaded. Rewrite function documentation.
384 Adjust implementation to always load all DLLs.
385 Add 0x1000 offset to DLL base address when calling
387 (child_initialization_done): New static global.
388 (do_initial_child_stuff): Set child_initialization_done to
389 zero during child initialization, and 1 after. Replace call
390 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
392 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
393 (handle_unload_dll): Add function documentation.
394 (get_child_debug_event): Ignore load and unload DLL events
395 during child initialization.
397 2014-02-20 Doug Evans <dje@google.com>
399 Remove global all_lwps.
400 * inferiors.h (ptid_of): Move here from linux-low.h.
401 (pid_of, lwpid_of): Ditto.
402 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
403 parameter is a struct thread_info * now.
404 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
405 directly. Pass &all_threads to find_inferior instead of &all_lwps.
406 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
408 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
409 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
410 * linux-arm-low.c (update_registers_callback): Update, "entry"
411 parameter is a struct thread_info * now.
412 Fetch lwpid from current_inferior directly.
413 (arm_insert_point): Pass &all_threads to find_inferior instead of
415 (arm_remove_point): Ditto.
416 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
417 (arm_prepare_to_resume): Fetch pid from thread.
418 (arm_read_description): Fetch lwpid from current_inferior directly.
419 * linux-low.c (all_lwps): Delete.
420 (delete_lwp): Delete call to remove_inferior.
421 (handle_extended_wait): Fetch lwpid from thread.
422 (add_lwp): Don't set lwp->entry.id. Remove call to
423 add_inferior_to_list.
424 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
425 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
426 (kill_one_lwp_callback): Ditto.
427 (linux_kill): Don't dereference NULL pointer.
428 Fetch ptid,lwpid from thread.
429 (get_detach_signal): Fetch ptid from thread.
430 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
431 Simplify call to regcache_invalidate_thread.
432 (delete_lwp_callback): Update, "entry" parameter is a
433 struct thread_info * now. Fetch pid from thread.
434 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
435 (status_pending_p_callback): Update, "entry" parameter is a
436 struct thread_info * now. Fetch ptid from thread.
437 (find_lwp_pid): Update, "entry" parameter is a
438 struct thread_info * now.
439 (linux_wait_for_lwp): Fetch pid from thread.
440 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
441 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
442 (enqueue_one_deferred_signal): Fetch lwpid from thread.
443 (dequeue_one_deferred_signal): Ditto.
444 (cancel_breakpoint): Fetch ptid from current_inferior.
445 (linux_wait_for_event): Pass &all_threads to find_inferior,
446 not &all_lwps. Fetch ptid, lwpid from thread.
447 (count_events_callback): Update, "entry" parameter is a
448 struct thread_info * now.
449 (select_singlestep_lwp_callback): Ditto.
450 (select_event_lwp_callback): Ditto.
451 (cancel_breakpoints_callback): Ditto.
452 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
454 (select_event_lwp): Ditto. Fetch ptid from event_thread.
455 (unsuspend_one_lwp): Update, "entry" parameter is a
456 struct thread_info * now.
457 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
459 (linux_stabilize_threads): Ditto. And for for_each_inferior.
460 Fetch lwpid from thread, not lwp.
461 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
462 Pass &all_threads to find_inferior, not &all_lwps.
463 (send_sigstop): Fetch lwpid from thread, not lwp.
464 (send_sigstop_callback): Update, "entry" parameter is a
465 struct thread_info * now.
466 (suspend_and_send_sigstop_callback): Ditto.
467 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
468 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
469 struct thread_info * now.
470 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
472 (lwp_running): Update, "entry" parameter is a
473 struct thread_info * now.
474 (stop_all_lwps): Fetch ptid from thread.
475 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
476 (linux_resume_one_lwp): Fetch lwpid from thread.
477 (linux_set_resume_request): Update, "entry" parameter is a
478 struct thread_info * now. Fetch pid, lwpid from thread.
479 (resume_status_pending_p): Update, "entry" parameter is a
480 struct thread_info * now.
481 (need_step_over_p): Ditto. Fetch lwpid from thread.
482 (start_step_over): Fetch lwpid from thread.
483 (linux_resume_one_thread): Update, "entry" parameter is a
484 struct thread_info * now. Fetch lwpid from thread.
485 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
486 (proceed_one_lwp): Update, "entry" parameter is a
487 struct thread_info * now. Fetch lwpid from thread.
488 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
489 struct thread_info * now.
490 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
491 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
492 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
494 (regsets_store_inferior_registers): Ditto.
495 (fetch_register, store_register): Ditto.
496 (linux_read_memory, linux_write_memory): Ditto.
497 (linux_request_interrupt): Ditto.
498 (linux_read_auxv): Ditto.
499 (linux_xfer_siginfo): Ditto.
500 (linux_qxfer_spu): Ditto.
501 (linux_qxfer_libraries_svr4): Ditto.
502 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
503 moved to inferiors.h.
505 (get_thread_lwp): Update.
506 (struct lwp_info): Delete member "entry". Simplify comment for
509 * linux-mips-low.c (mips_read_description): Fetch lwpid from
510 current_inferior directly.
511 (update_watch_registers_callback): Update, "entry" parameter is a
512 struct thread_info * now. Fetch pid from thread.
513 (mips_linux_prepare_to_resume): Fetch ptid from thread.
514 (mips_insert_point): Fetch lwpid from current_inferior.
515 Pass &all_threads to find_inferior, not &all_lwps.
516 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
517 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
519 (mips_stopped_data_address): Ditto.
520 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
522 * linux-tile-low.c (tile_arch_setup): Ditto.
523 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
524 (update_debug_registers_callback): Update, "entry" parameter is a
525 struct thread_info * now. Fetch pid from thread.
526 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
527 Pass &all_threads to find_inferior, not &all_lwps.
528 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
529 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
530 Pass &all_threads to find_inferior, not &all_lwps.
531 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
532 (i386_dr_low_get_status): Ditto.
533 (x86_linux_prepare_to_resume): Fetch ptid from thread.
534 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
535 (x86_linux_read_description): Ditto.
536 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
538 2014-02-20 Doug Evans <dje@google.com>
540 * inferiors.c (get_first_inferior): Fix buglet.
542 2014-02-19 Doug Evans <dje@google.com>
544 * gdbthread.h (add_thread): Change result type to struct thread_info *.
545 * inferiors.c (add_thread): Change result type to struct thread_info *.
547 (add_lwp): Call add_thread here instead of in callers.
549 * linux-low.h (get_lwp_thread): Rewrite.
550 (struct lwp_info): New member "thread".
552 2014-02-19 Doug Evans <dje@google.com>
554 * linux-low.c (add_lwp): Change result to struct lwp_info *.
557 2014-02-19 Doug Evans <dje@google.com>
559 * inferiors.c (add_thread): Fix whitespace.
561 2014-02-19 Doug Evans <dje@google.com>
563 * dll.c (clear_dlls): Replace accessing list implemention details
565 * gdbthread.h (get_first_thread): Declare.
566 * inferiors.c (for_each_inferior_with_data): New function.
567 (get_first_thread): New function.
568 (find_thread_ptid): Simplify.
569 (get_first_inferior): New function.
570 (clear_list): Delete.
571 (one_inferior_p): New function.
572 (clear_inferior_list): New function.
573 (clear_inferiors): Update.
574 * inferiors.h (for_each_inferior_with_data): Declare.
575 (clear_inferior_list): Declare.
576 (one_inferior_p): Declare.
577 (get_first_inferior): Declare.
578 * linux-low.c (linux_wait_for_event): Replace accessing list
579 implemention details with API function.
580 * server.c (target_running): Ditto.
581 (accumulate_file_name_length): New function.
582 (emit_dll_description): New function.
583 (handle_qxfer_libraries): Replace accessing list implemention
584 details with API function.
585 (handle_qxfer_threads_worker): New function.
586 (handle_qxfer_threads_proper): Replace accessing list implemention
587 details with API function.
588 (handle_query): Ditto.
589 (visit_actioned_threads_callback_ftype): New typedef.
590 (visit_actioned_threads_data): New struct.
591 (visit_actioned_threads): Rewrite to be find_inferior callback.
592 (resume): Call find_inferior.
593 (handle_status): Replace accessing list implemention
594 details with API function.
595 (process_serial_event): Replace accessing list implemention details
597 * target.c (set_desired_inferior): Replace accessing list implemention
598 details with API function.
599 * tracepoint.c (same_process_p): New function.
600 (gdb_agent_about_to_close): Replace accessing list implemention
601 details with API function.
602 * win32-low.c (child_delete_thread): Replace accessing list
603 implemention details with API function.
604 (match_dll_by_basename): New function.
605 (dll_is_loaded_by_basename): New function.
606 (win32_ensure_ntdll_loaded): Replace accessing list implemention
607 details call to dll_is_loaded_by_basename.
609 2014-02-19 Doug Evans <dje@google.com>
611 * dll.h (struct dll_info): Add comment.
612 * gdbthread.h (struct thread_info): Add comment.
613 (current_ptid): Simplify.
614 * inferiors.c (add_process): Update.
615 (remove_process): Update.
616 * inferiors.h (struct process_info): Rename member "head" to "entry".
617 * linux-low.c (delete_lwp): Update.
619 (last_thread_of_process_p): Update.
620 (kill_one_lwp_callback, linux_kill): Update.
621 (status_pending_p_callback): Update.
622 (wait_for_sigstop): Update. Simplify read of ptid.
623 (start_step_over): Update.
624 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
625 (get_lwp_thread): Update.
626 (struct lwp_info): Rename member "head" to "entry".
627 * regcache.h (inferior_list_entry): Delete.
628 * server.c (kill_inferior_callback): Update.
629 (detach_or_kill_inferior_callback): Update.
630 (print_started_pid): Update.
631 (print_attached_pid): Update.
632 (process_serial_event): Simplify read of ptid.
633 * thread-db.c (thread_db_create_event): Update.
634 (thread_db_get_tls_address): Update.
635 * win32-low.c (current_inferior_ptid): Simplify.
637 2014-02-19 Tom Tromey <tromey@redhat.com>
639 * target.h (struct target_ops) <supports_btrace>: Add target_ops
641 (target_supports_btrace): Update.
643 2014-02-14 Yao Qi <yao@codesourcery.com>
645 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
646 (rsp-low-ipa.o): New target.
648 2014-02-12 Tom Tromey <tromey@redhat.com>
650 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
651 convert_ascii_to_int.
652 * regcache.c (registers_to_string): Likewise.
653 * remote-utils.c (decode_M_packet): Likewise.
654 * server.c (process_serial_event): Likewise.
656 2014-02-12 Tom Tromey <tromey@redhat.com>
658 * server.c (handle_query, handle_v_run): Use hex2bin, not
660 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
662 2014-02-12 Tom Tromey <tromey@redhat.com>
664 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
665 convert_int_to_ascii.
666 * regcache.c (registers_to_string, collect_register_as_string):
668 * remote-utils.c (look_up_one_symbol, relocate_instruction):
670 * server.c (process_serial_event): Likewise.
671 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
672 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
674 2014-02-12 Tom Tromey <tromey@redhat.com>
676 * remote-utils.c (look_up_one_symbol, monitor_output): Use
678 * tracepoint.c (cmd_qtstatus): Likewise.
680 2014-02-12 Tom Tromey <tromey@redhat.com>
682 * remote-utils.c (monitor_output): Pass explicit length to
685 2014-02-12 Tom Tromey <tromey@redhat.com>
687 * tracepoint.c: Include rsp-low.h.
688 * server.c: Include rsp-low.h.
689 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
690 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
692 * remote-utils.c: Include rsp-low.h.
693 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
694 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
695 (convert_int_to_ascii, convert_ascii_to_int): Move to
697 * regcache.c: Include rsp-low.h.
698 * ax.c: Include rsp-low.h.
699 * Makefile.in (SFILES): Add common/rsp-low.c.
700 (OBS): Add rsp-low.o.
701 (rsp-low.o): New target.
703 2014-02-12 Tom Tromey <tromey@redhat.com>
705 * utils.h (pulongest, plongest, phex_nz): Don't declare.
706 Include print-utils.h.
707 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
708 (plongest, thirty_two, phex_nz): Remove.
709 * Makefile.in (SFILES): Add common/print-utils.c.
710 (OBS): Add print-utils.o.
711 (print-utils-ipa.o): New target.
712 (print-utils.o): New target.
713 (IPA_OBJS): Add print-utils-ipa.o.
715 2014-02-06 Tom Tromey <tromey@redhat.com>
717 * Makefile.in (SFILES): Fix indentation.
719 2014-02-05 Doug Evans <dje@google.com>
721 * linux-low.c (linux_wait_for_event): Improve comment.
722 (linux_wait_1): Keep current_inferior in sync with event_child.
724 2014-01-22 Doug Evans <dje@google.com>
726 * gdbthread.h (gdb_id_to_thread): Delete, unused.
728 2014-01-22 Doug Evans <dje@google.com>
730 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
731 * configure: Regenerate.
732 * config.in: Regenerate.
733 * Makefile.in (SFILES): Add debug.c.
737 * linux-aarch64-low.c (*): Update all debugging printfs to use
738 debug_printf instead of fprintf.
739 * linux-arm-low.c (*): Ditto.
740 * linux-cris-low.c (*): Ditto.
741 * linux-crisv32-low.c (*): Ditto.
742 * linux-m32r-low.c (*): Ditto.
743 * linux-sparc-low.c (*): Ditto.
744 * linux-x86.c (*): Ditto.
745 * linux-low.c (*): Ditto.
746 (linux_wait_1): Add calls to debug_enter, debug_exit.
747 (linux_wait): Remove redundant debugging printf.
748 (stop_all_lwps): Add calls to debug_enter, debug_exit.
749 (linux_resume, unstop_all_lwps): Ditto.
750 * mem-break.c (*): Update all debugging printfs to use
751 debug_printf instead of fprintf.
752 * remote-utils.c (*): Ditto.
753 * thread-db.c (*): Ditto.
754 * server.c #include <ctype.h>, "gdb_vecs.h".
755 (debug_threads): Moved to debug.c.
756 (*): Update all debugging printfs to use debug_printf instead of
758 (start_inferior): Replace call to fflush with call to debug_flush.
759 (monitor_show_help): Mention set debug-format.
760 (parse_debug_format_options): New function.
761 (handle_monitor_command): Handle "monitor set debug-format".
762 (gdbserver_usage): Mention --debug-format.
763 (main): Parse --debug-format.
764 * server.h (debug_threads): Declaration moved to debug.h.
766 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
767 trace_debug_1 that uses debug_printf.
768 (tracepoint_look_up_symbols): Update all debugging printfs to use
769 debug_printf instead of fprintf.
771 2014-01-20 Baruch Siach <baruch@tkos.co.il>
773 * linux-xtensa-low.c: Include asm/ptrace.h instead of
776 2014-01-17 Pedro Alves <palves@redhat.com>
779 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
780 defined after including gdb_proc_service.h.
782 2014-01-16 Doug Evans <dje@google.com>
784 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
787 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
789 * target.h (target_ops) <read_btrace>: Change parameters and
790 return type to allow error reporting.
791 * server.c (handle_qxfer_btrace): Support delta reads. Pass
792 trace reading errors on.
793 * linux-low.c (linux_low_read_btrace): Pass trace reading
795 (linux_low_disable_btrace): New.
797 2014-01-15 Doug Evans <dje@google.com>
799 * inferiors.c (thread_id_to_gdb_id): Delete.
800 * inferiors.h (thread_id_to_gdb_id): Delete.
802 2014-01-13 Eli Zaretskii <eliz@gnu.org>
804 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
805 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
808 2014-01-08 Pedro Alves <palves@redhat.com>
810 * server.c (handle_status): Don't discard previous queued stop
811 replies or thread's pending status here.
812 (main) <disconnection>: Do it here instead.
814 2014-01-08 Pedro Alves <palves@redhat.com>
816 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
817 * server.c (visit_actioned_threads, handle_pending_status): New
819 (handle_v_cont): Factor out parts to ...
820 (resume): ... this new function. If in all-stop, and a thread
821 being resumed has a pending status, report it without actually
823 (myresume): Adjust to use the new 'resume' function.
824 (clear_pending_status_callback, set_pending_status_callback)
825 (find_status_pending_thread_callback): New functions.
826 (handle_status): Handle the case of multiple threads having
827 interesting statuses to report. Report threads' real last signal
828 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
829 with an interesting thread to report the status for, instead of
830 always reporting the status of the first thread.
832 2014-01-01 Joel Brobecker <brobecker@adacore.com>
834 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
835 * gdbreplay.c (gdbreplay_version): Likewise.
837 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
839 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
840 iov.iov_len with the real length in use.
842 2013-12-13 Joel Brobecker <brobecker@adacore.com>
844 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
845 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
846 for all targets that use win32-low.c.
847 * win32-low.c (win32_ensure_ntdll_loaded): New function.
848 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
850 2013-12-13 Pedro Alves <palves@redhat.com>
852 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
853 if equal to TARGET_WAITKIND_LOADED.
854 * win32-low.c (cached_status): New static global.
855 (win32_wait): Add declaration.
856 (do_initial_child_stuff): Flush all initial pending debug events
857 up to the initial breakpoint.
858 (win32_wait): If CACHED_STATUS was set, return that instead
859 of doing a real wait. Remove the code resuming the execution
860 of the inferior after receiving a TARGET_WAITKIND_LOADED event
861 during the initial phase. Also remove the code changing
862 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
863 TARGET_WAITKIND_STOPPED.
865 2013-12-11 Yao Qi <yao@codesourcery.com>
867 * notif.c (handle_notif_ack): Return 0 if no notification
870 2013-11-20 Doug Evans <dje@google.com>
872 * linux-low.c (linux_set_resume_request): Fix comment.
874 2013-11-20 Doug Evans <dje@google.com>
876 * linux-low.c (resume_status_pending_p): Tweak comment.
878 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
880 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
881 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
882 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
883 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
884 (srv_amd64_regobj): Add amd64-mpx.o.
885 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
886 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
887 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
888 * i387-fp.c (num_pl_bnd_register) Added constant.
889 (num_pl_bnd_cfg_registers) Added constant.
890 (struct i387_xsave) Added reserved area and MPX fields.
891 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
892 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
894 (tdesc_i386_mpx_linux): Add MPX amd64 target.
895 (init_registers_amd64_mpx_linux): Declare new function.
896 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
897 (x86_64_regmap): Add MPX registers.
898 (x86_linux_read_description): Add MPX case.
899 (initialize_low_arch): Initialize MPX targets.
901 2013-11-18 Tom Tromey <tromey@redhat.com>
903 * configure: Rebuild.
904 * configure.ac: Don't check for stdlib.h.
905 * gdbreplay.c: Unconditionally include stdlib.h.
907 2013-11-18 Tom Tromey <tromey@redhat.com>
909 * config.in: Rebuild.
910 * configure: Rebuild.
911 * configure.ac: Don't use AC_HEADER_DIRENT.
913 2013-11-18 Tom Tromey <tromey@redhat.com>
915 * server.h: Don't check HAVE_STRING_H.
916 * gdbreplay.c: Don't check HAVE_STRING_H.
917 * configure: Rebuild.
919 2013-11-18 Tom Tromey <tromey@redhat.com>
921 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
924 2013-11-08 Tom Tromey <tromey@redhat.com>
926 * configure, config.in: Rebuild.
927 * configure.ac: Remove unused configury.
929 2013-11-08 Tom Tromey <tromey@redhat.com>
931 * acinclude.m4: Include common.m4, codeset.m4.
932 * configure, config.in: Rebuild.
933 * configure.ac: Use GDB_AC_COMMON.
935 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
937 * linux-s390-low.c (HWCAP_S390_TE): New define.
938 (s390_arch_setup): Consider the TE field in the HWCAP for
939 determining 'have_regset_tdb'.
941 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
944 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
947 2013-10-02 Pedro Alves <palves@redhat.com>
949 * server.c (process_serial_event): Don't output "GDBserver
950 exiting" if GDB is connected through stdio.
951 * target.c (mywait): Likewise, be silent if GDB is connected
954 2013-10-01 Joel Brobecker <brobecker@adacore.com>
956 * lynx-low.c (lynx_add_threads_after_attach): New function.
957 (lynx_attach): Remove call to add_thread. Add call to
958 lynx_add_threads_after_attach instead.
960 2013-09-28 Mike Frysinger <vapier@gentoo.org>
962 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
963 * config.in, configure: Regenerated.
965 2013-09-18 Yao Qi <yao@codesourcery.com>
968 * server.c (start_inferior): Clear 'resume_info'.
970 2013-09-16 Jiong Wang <jiwang@tilera.com>
972 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
975 2013-09-16 Jiong Wang <jiwang@tilera.com>
977 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
978 linux-tile-low.o to srv_tgtobj.
980 2013-09-16 Will Newton <will.newton@linaro.org>
982 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
985 2013-09-06 Pedro Alves <palves@redhat.com>
987 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
988 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
989 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
990 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
991 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
992 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
994 2013-09-06 Pedro Alves <palves@redhat.com>
996 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
997 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
999 2013-09-06 Pedro Alves <palves@redhat.com>
1001 * linux-amd64-ipa.c: Include tracepoint.h.
1002 * linux-i386-ipa.c: Include tracepoint.h.
1004 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1006 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1007 (ps_get_thread_area): New function.
1009 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1011 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1012 (initialize_low_arch): Call init_registers_crisv32 rather than
1013 init_register_crisv32.
1015 2013-09-05 Pedro Alves <palves@redhat.com>
1017 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1019 * hostio.h: ... this new file.
1020 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1021 win32-low.c: Include hostio.h.
1023 2013-09-05 Pedro Alves <palves@redhat.com>
1025 * server.h (gdb_client_data, handler_func, callback_handler_func)
1026 (delete_file_handler, add_file_handler, append_callback_event)
1027 (delete_callback_event, start_event_loop, initialize_event_loop):
1028 Move to event-loop.h and include it.
1029 * event-loop.h: New file.
1031 2013-09-05 Pedro Alves <palves@redhat.com>
1033 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1034 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1035 (loaded_dll, unloaded_dll): Move to ...
1036 * dll.h: ... this new file.
1037 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1039 2013-09-05 Pedro Alves <palves@redhat.com>
1041 * server.h (current_process, get_thread_process, all_processes)
1042 (add_inferior_to_list, for_each_inferior, current_inferior)
1043 (remove_inferior, add_process, remove_process, find_process_pid)
1044 (have_started_inferiors_p, have_attached_inferiors_p)
1045 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1046 (clear_inferiors, find_inferior, find_inferior_id)
1047 (inferior_target_data, set_inferior_target_data)
1048 (inferior_regcache_data, set_inferior_regcache_data): Move to
1049 inferiors.h, and include it.
1050 * inferiors.h: New file.
1052 2013-09-05 Pedro Alves <palves@redhat.com>
1054 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1058 2013-09-05 Pedro Alves <palves@redhat.com>
1060 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1062 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1063 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1064 (handle_tracepoint_general_set, handle_tracepoint_query)
1065 (tracepoint_finished_step, tracepoint_was_hit)
1066 (release_while_stepping_state_list, current_traceframe)
1067 (in_readonly_region, traceframe_read_mem)
1068 (fetch_traceframe_registers, traceframe_read_sdata)
1069 (traceframe_read_info, struct fast_tpoint_collect_status)
1070 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1071 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1072 (supply_fast_tracepoint_registers)
1073 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1074 (ipa_tdesc, claim_trampoline_space)
1075 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1076 (agent_mem_read, agent_get_trace_state_variable_value)
1077 (agent_set_trace_state_variable_value, agent_tsv_read)
1078 (agent_mem_read_string, get_raw_reg_func_addr)
1079 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1080 * tracepoint.h: ... this new file.
1082 2013-09-05 Pedro Alves <palves@redhat.com>
1084 * server.h (perror_with_name, error, fatal, warning, paddress)
1085 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1087 * utils.h: New file.
1089 2013-09-05 Pedro Alves <palves@redhat.com>
1091 * server.h (remote_debug, noack_mode, transport_is_reliable)
1092 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1093 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1094 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1095 (write_enn, initialize_async_io, enable_async_io)
1096 (disable_async_io, check_remote_input_interrupt_request)
1097 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1098 (dead_thread_notify, prepare_resume_reply)
1099 (decode_address_to_semicolon, decode_address, decode_m_packet)
1100 (decode_M_packet, decode_X_packet, decode_xfer_write)
1101 (decode_search_memory_packet, unhexify, hexify)
1102 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1103 (look_up_one_symbol, relocate_instruction)
1104 (monitor_output): Move to remote-utils.h, and include it.
1105 * remote-utils.h: New file.
1107 2013-09-05 Pedro Alves <palves@redhat.com>
1109 * server.h (_): Delete.
1111 2013-09-02 Pedro Alves <palves@redhat.com>
1113 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1114 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1116 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1118 2013-09-02 Pierre Muller <muller@sourceware.org>
1120 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1121 or WriteProcessMemory complete successfully and handle
1122 ERROR_PARTIAL_COPY error.
1124 2013-09-02 Pedro Alves <palves@redhat.com>
1126 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1127 error instead of EIO.
1129 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1132 * linux-low.c: Include filestuff.h.
1133 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1134 * lynx-low.c: Include filestuff.h.
1135 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1136 * server.c: Include filestuff.h.
1137 (main): Call notice_open_fds.
1138 * spu-low.c: Include filestuff.h.
1139 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1141 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1143 * Makefile.in: Explain why ../target and ../nat are not
1144 listed as include file search paths.
1145 (linux-waitpid.o): New object file rule.
1146 * configure.srv (srv_native_linux_obj): New variable.
1147 Replace all occurrences of linux native object files with
1148 $srv_native_linux_obj.
1149 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1150 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1151 (linux_enable_event_reporting): Remove declaration.
1152 (my_waitpid): Moved to common/linux-waitpid.c.
1153 (linux_wait_for_event): Pass ptid when calling
1154 linux_enable_event_reporting.
1155 (linux_supports_tracefork_flag): Remove.
1156 (linux_enable_event_reporting): Likewise.
1157 (linux_tracefork_grandchild): Remove.
1158 (STACK_SIZE): Moved to common/linux-ptrace.c.
1159 (linux_tracefork_child): Remove.
1160 (linux_test_for_tracefork): Remove.
1161 (linux_look_up_symbols): Call linux_supports_traceclone.
1162 (initialize_low): Remove call to linux_test_for_tracefork.
1163 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1164 common/linux-ptrace.h.
1165 (PTRACE_TYPE_ARG4): Likewise.
1166 Include linux-ptrace.h.
1168 2013-08-21 Pedro Alves <palves@redhat.com>
1170 * config.in: Renegerate.
1172 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1174 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1175 (SFILES): Remove $(srcdir)/common/target-common.c and
1176 add $(srcdir)/target/waitstatus.c.
1177 (OBS): Remove target-common.o and add waitstatus.o.
1178 (server_h): Remove $(srcdir)/../common/target-common.h and
1179 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1180 and $(srcdir)/../target/waitstatus.h.
1181 (target-common.o): Remove.
1182 (waitstatus.o): New target object file.
1183 * target.h: Do not include target-common.h and
1184 include target/resume.h, target/wait.h and
1185 target/waitstatus.h.
1187 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1189 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1190 to PTRACE_TYPE_ARG3.
1191 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1192 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1194 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1195 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1197 2013-07-27 Jie Zhang <jie@codesourcery.com>
1198 Daniel Jacobowitz <dan@codesourcery.com>
1199 Yao Qi <yao@codesourcery.com>
1201 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1202 (mips-linux-watch.o): New rule.
1203 (mips_linux_watch_h): New variable.
1204 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1206 * linux-mips-low.c: Include mips-linux-watch.h.
1207 (struct arch_process_info, struct arch_lwp_info): New.
1208 (update_watch_registers_callback): New function.
1209 (mips_linux_new_process, mips_linux_new_thread) New functions.
1210 (mips_linux_prepare_to_resume, mips_insert_point): New
1212 (mips_remove_point, mips_stopped_by_watchpoint): New
1214 (rsp_bp_type_to_target_hw_bp_type): New function.
1215 (mips_stopped_data_address): New function.
1216 (the_low_target): Add watchpoint support functions.
1218 2013-07-27 Yao Qi <yao@codesourcery.com>
1220 * i386-low.c: Include break-common.h.
1221 (enum target_hw_bp_type): Remove.
1223 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1225 * Makefile.in (SFILES): /common/target-common.c.
1226 (OBS): Add target-common.o.
1227 (server_h): Add $(srcdir)/../common/target-common.h.
1228 (target-common.o): New target.
1229 * server.c (queue_stop_reply_callback): Free
1230 status string after use.
1231 * target.c (target_waitstatus_to_string): Remove.
1232 * target.h: Include target-common.h.
1233 (resume_kind): Likewise.
1234 (target_waitkind): Likewise.
1235 (target_waitstatus): Likewise.
1236 (TARGET_WNOHANG): Likewise.
1238 2013-07-04 Yao Qi <yao@codesourcery.com>
1240 * Makefile.in (host_alias): Use @host_noncanonical@.
1241 (target_alias): Use @target_noncanonical@.
1242 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1243 ACX_NONCANONICAL_HOST.
1244 * configure: Regenerated.
1247 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1249 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1250 * configure: Rebuild.
1251 * Makefile.in (version_host, version_target): Get from configure.
1252 (version.c): Use $(version_host) and $(version_target).
1254 2013-07-03 Pedro Alves <palves@redhat.com>
1256 * Makefile.in (config.status): Depend on development.sh.
1257 * acinclude.m4: Include libmcheck.m4.
1258 * configure: Regenerate.
1260 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1262 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1263 attribute inside the parentheses.
1264 (winapi_DebugSetProcessKillOnExit): Ditto.
1265 (winapi_DebugBreakProcess): Ditto.
1266 (winapi_GenerateConsoleCtrlEvent): Ditto.
1268 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1270 * notif.h (notif_event): Add a dummy member to avoid compiler
1273 2013-07-01 Pedro Alves <palves@redhat.com>
1275 * hostio.c (HOSTIO_PATH_MAX): Define.
1276 (require_filename, handle_open, handle_unlink, handle_readlink):
1279 2013-07-01 Pedro Alves <palves@redhat.com>
1281 * server.h: Include "pathmax.h".
1282 * linux-low.c: Don't include sys/param.h.
1283 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1285 * win32-low.c: Don't include sys/param.h.
1286 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1288 2013-07-01 Pedro Alves <palves@redhat.com>
1290 * event-loop.c: Don't check HAVE_UNISTD_H before including
1292 * gdbreplay.c: Likewise.
1293 * remote-utils.c: Likewise.
1294 * server.c: Likewise.
1295 * configure.ac: Don't check for unistd.h.
1296 * configure: Regenerate.
1298 2013-06-28 Tom Tromey <tromey@redhat.com>
1300 * Makefile.in (version.c): Use version.in, not
1303 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1305 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1306 * configure: Rebuild.
1307 * Makefile.in (version_host, version_target): Get from configure.
1308 (version.c): Use $(version_host) and $(version_target).
1310 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1312 Fix trace-status to output user name without trailing colon.
1313 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1315 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1317 Fix trace-status to output proper start-time and stop-time.
1318 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1319 output start time and stop time in hex as gdb expects.
1321 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1323 * tracepoint.c (build_traceframe_info_xml): Output trace state
1324 variables present in the trace buffer.
1326 2013-06-24 Tom Tromey <tromey@redhat.com>
1328 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1330 (version.o): Remove.
1331 * gdbreplay.c: Include version.h.
1332 (version, host_name): Don't declare.
1333 * server.h: Include version.h.
1334 (version, host_name): Don't declare.
1336 2013-06-12 Pedro Alves <palves@redhat.com>
1338 * linux-x86-low.c (linux_is_elf64): Delete global.
1339 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1340 with local linux_pid_exe_is_elf_64_file use.
1342 2013-06-11 Pedro Alves <palves@redhat.com>
1344 * linux-low.c (regset_disabled, disable_regset): New functions.
1345 (regsets_fetch_inferior_registers)
1346 (regsets_store_inferior_registers): Use them.
1347 (initialize_regsets_info); Don't allocate the disabled_regsets
1349 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1352 2013-06-11 Pedro Alves <palves@redhat.com>
1354 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1357 2013-06-11 Pedro Alves <palves@redhat.com>
1359 * linux-x86-low.c (initialize_low_arch): Call
1360 init_registers_x32_avx_linux.
1362 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1364 Fix compatibility with Android Bionic.
1365 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1368 2013-06-07 Pedro Alves <palves@redhat.com>
1371 * Makefile.in (OBS): Add tdesc.o.
1372 (IPA_OBJS): Add tdesc-ipa.o.
1373 (tdesc-ipa.o): New rule.
1374 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1376 * linux-low.c (new_inferior): Delete.
1377 (disabled_regsets, num_regsets): Delete.
1378 (linux_add_process): Adjust to set the new per-process
1380 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1381 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1382 was a stop. When calling arch_setup, switch the current inferior
1383 to the thread that got an event.
1384 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1385 (regsets_fetch_inferior_registers)
1386 (regsets_store_inferior_registers): New regsets_info parameter.
1388 (linux_register_in_regsets): New regs_info parameter. Adjust to
1390 (register_addr, fetch_register, store_register): New usrregs_info
1391 parameter. Adjust to use it.
1392 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1393 parameter regs_info. Adjust to use it.
1394 (linux_fetch_registers): Get the current inferior's regs_info, and
1396 (linux_store_registers): Ditto.
1397 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1398 (initialize_low): Don't initialize the target_regsets here. Call
1399 initialize_low_arch.
1400 * linux-low.h (target_regsets): Delete declaration.
1401 (struct regsets_info): New.
1402 (struct usrregs_info): New.
1403 (struct regs_info): New.
1404 (struct process_info_private) <new_inferior>: New field.
1405 (struct linux_target_ops): Delete the num_regs, regmap, and
1406 regset_bitmap fields. New field regs_info.
1407 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1408 * i387-fp.c (num_xmm_registers): Delete.
1409 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1410 calls to new interface.
1411 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1412 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1413 Infer the number of xmm registers from the regcache's target
1415 * i387-fp.h (num_xmm_registers): Delete.
1416 * inferiors.c (add_thread): Don't install the thread's regcache
1418 * proc-service.c (gregset_info): Fetch the current inferior's
1419 regs_info. Adjust to use it.
1420 * regcache.c: Include tdesc.h.
1421 (register_bytes, reg_defs, num_registers)
1422 (gdbserver_expedite_regs): Delete.
1423 (get_thread_regcache): If the thread doesn't have a regcache yet,
1424 create one, instead of aborting gdbserver.
1425 (regcache_invalidate_one): Rename to ...
1426 (regcache_invalidate_thread): ... this.
1427 (regcache_invalidate_one): New.
1428 (regcache_invalidate): Only invalidate registers of the current
1430 (init_register_cache): Add target_desc parameter, and use it.
1431 (new_register_cache): Ditto. Assert the target description has a
1432 non zero registers_size.
1433 (regcache_cpy): Add assertions. Adjust.
1434 (realloc_register_cache, set_register_cache): Delete.
1435 (registers_to_string, registers_from_string): Adjust.
1436 (find_register_by_name, find_regno, find_register_by_number)
1437 (register_cache_size): Add target_desc parameter, and use it.
1438 (free_register_cache_thread, free_register_cache_thread_one)
1439 (regcache_release, register_cache_size): New.
1440 (register_size): Add target_desc parameter, and use it.
1441 (register_data, supply_register, supply_register_zeroed)
1442 (supply_regblock, supply_register_by_name, collect_register)
1443 (collect_register_as_string, collect_register_by_name): Adjust.
1444 * regcache.h (struct target_desc): Forward declare.
1445 (struct regcache) <tdesc>: New field.
1446 (init_register_cache, new_register_cache): Add target_desc
1448 (regcache_invalidate_thread): Declare.
1449 (regcache_invalidate_one): Delete declaration.
1450 (regcache_release): Declare.
1451 (find_register_by_number, register_cache_size, register_size)
1452 (find_regno): Add target_desc parameter.
1453 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1455 * remote-utils.c: Include tdesc.h.
1456 (outreg, prepare_resume_reply): Adjust.
1457 * server.c: Include tdesc.h.
1458 (gdbserver_xmltarget): Delete declaration.
1459 (get_features_xml, process_serial_event): Adjust.
1460 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1462 (struct process_info) <tdesc>: New field.
1463 (ipa_tdesc): Declare.
1464 * tdesc.c: New file.
1465 * tdesc.h: New file.
1466 * tracepoint.c: Include tdesc.h.
1467 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1468 (get_context_regcache): Adjust to pass ipa_tdesc down.
1469 (do_action_at_tracepoint): Adjust to get the register cache size
1470 from the context regcache's description.
1471 (traceframe_walk_blocks): Adjust to get the register cache size
1472 from the current trace frame's description.
1473 (traceframe_get_pc): Adjust to get current trace frame's
1474 description and pass it down.
1475 (gdb_collect): Adjust to get the register cache size from the
1477 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1478 (gdbserver_xmltarget): Delete.
1479 (initialize_low_tracepoint): Set the ipa's target description.
1480 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1481 (initialize_low_tracepoint): Set the ipa's target description.
1482 * linux-x86-low.c: Include tdesc.h.
1483 [__x86_64__] (is_64bit_tdesc): New.
1484 (ps_get_thread_area, x86_get_thread_area): Use it.
1485 (i386_cannot_store_register): Rename to ...
1486 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1487 (i386_cannot_fetch_register): Rename to ...
1488 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1489 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1491 (target_regsets): Rename to ...
1492 (x86_regsets): ... this.
1493 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1495 (x86_siginfo_fixup): Use is_64bit_tdesc.
1496 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1497 (tdesc_x32_avx_linux, tdesc_x32_linux)
1498 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1500 (x86_linux_update_xmltarget): Delete.
1501 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1502 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1503 (AMD64_LINUX_USER64_CS): New.
1504 (x86_linux_read_description): New, based on
1505 x86_linux_update_xmltarget.
1506 (same_process_callback): New.
1507 (x86_arch_setup_process_callback): New.
1508 (x86_linux_update_xmltarget): New.
1509 (x86_regsets_info): New.
1510 (amd64_linux_regs_info): New.
1511 (i386_linux_usrregs_info): New.
1512 (i386_linux_regs_info): New.
1513 (x86_linux_regs_info): New.
1514 (x86_arch_setup): Reimplement.
1515 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1516 (x86_emit_ops): Ditto.
1517 (the_low_target): Adjust. Install x86_linux_regs_info,
1518 x86_cannot_fetch_register, and x86_cannot_store_register.
1519 (initialize_low_arch): New.
1520 * linux-ia64-low.c (tdesc_ia64): Declare.
1521 (ia64_fetch_register): Adjust.
1522 (ia64_usrregs_info, regs_info): New globals.
1523 (ia64_regs_info): New function.
1524 (the_low_target): Adjust.
1525 (initialize_low_arch): New function.
1526 * linux-sparc-low.c (tdesc_sparc64): Declare.
1527 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1529 (sparc_arch_setup): New function.
1530 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1531 (the_low_target): Adjust.
1532 (initialize_low_arch): New function.
1533 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1534 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1535 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1536 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1537 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1538 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1539 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1540 (tdesc_powerpc_isa205_vsx64l): Declare.
1541 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1542 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1543 (ppc_set_pc, ppc_get_hwcap): Adjust.
1544 (ppc_usrregs_info): Forward declare.
1545 (!__powerpc64__) ppc_regmap_adjusted: New global.
1546 (ppc_arch_setup): Adjust to the current process'es target
1548 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1549 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1550 (ppc_store_evrregset): Adjust.
1551 (target_regsets): Rename to ...
1552 (ppc_regsets): ... this, and make static.
1553 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1554 (ppc_regs_info): New function.
1555 (the_low_target): Adjust.
1556 (initialize_low_arch): New function.
1557 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1558 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1559 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1560 (tdesc_s390x_linux64v2): Declare.
1561 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1562 (s390_fill_gregset, s390_store_last_break): Adjust.
1563 (target_regsets): Rename to ...
1564 (s390_regsets): ... this, and make static.
1565 (s390_get_pc, s390_set_pc): Adjust.
1566 (s390_get_hwcap): New target_desc parameter, and use it.
1567 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1568 (s390_arch_setup): Adjust to set the current process'es target
1569 description. Don't adjust the regmap.
1570 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1571 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1572 (regs_info_3264): New globals.
1573 (s390_regs_info): New function.
1574 (the_low_target): Adjust.
1575 (initialize_low_arch): New function.
1576 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1577 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1578 [__mips64] (init_registers_mips_linux)
1579 (init_registers_mips_dsp_linux): Delete defines.
1580 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1581 (have_dsp): New global.
1582 (mips_read_description): New, based on mips_arch_setup.
1583 (mips_arch_setup): Reimplement.
1584 (get_usrregs_info): New function.
1585 (mips_cannot_fetch_register, mips_cannot_store_register)
1586 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1587 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1588 (target_regsets): Rename to ...
1589 (mips_regsets): ... this, and make static.
1590 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1591 (dsp_regs_info, regs_info): New globals.
1592 (mips_regs_info): New function.
1593 (the_low_target): Adjust.
1594 (initialize_low_arch): New function.
1595 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1596 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1598 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1599 (arm_read_description): New, with bits factored from
1601 (arm_arch_setup): Reimplement.
1602 (target_regsets): Rename to ...
1603 (arm_regsets): ... this, and make static.
1604 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1605 (arm_regs_info): New function.
1606 (the_low_target): Adjust.
1607 (initialize_low_arch): New function.
1608 * linux-m68k-low.c (tdesc_m68k): Declare.
1609 (target_regsets): Rename to ...
1610 (m68k_regsets): ... this, and make static.
1611 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1612 (m68k_regs_info): New function.
1613 (m68k_arch_setup): New function.
1614 (the_low_target): Adjust.
1615 (initialize_low_arch): New function.
1616 * linux-sh-low.c (tdesc_sharch): Declare.
1617 (target_regsets): Rename to ...
1618 (sh_regsets): ... this, and make static.
1619 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1620 (sh_regs_info, sh_arch_setup): New functions.
1621 (the_low_target): Adjust.
1622 (initialize_low_arch): New function.
1623 * linux-bfin-low.c (tdesc_bfin): Declare.
1624 (bfin_arch_setup): New function.
1625 (bfin_usrregs_info, regs_info): New globals.
1626 (bfin_regs_info): New function.
1627 (the_low_target): Adjust.
1628 (initialize_low_arch): New function.
1629 * linux-cris-low.c (tdesc_cris): Declare.
1630 (cris_arch_setup): New function.
1631 (cris_usrregs_info, regs_info): New globals.
1632 (cris_regs_info): New function.
1633 (the_low_target): Adjust.
1634 (initialize_low_arch): New function.
1635 * linux-cris-low.c (tdesc_crisv32): Declare.
1636 (cris_arch_setup): New function.
1637 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1638 (cris_regs_info): New function.
1639 (the_low_target): Adjust.
1640 (initialize_low_arch): New function.
1641 * linux-m32r-low.c (tdesc_m32r): Declare.
1642 (m32r_arch_setup): New function.
1643 (m32r_usrregs_info, regs_info): New globals.
1644 (m32r_regs_info): Adjust.
1645 (initialize_low_arch): New function.
1646 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1647 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1648 (tic6x_usrregs_info): Forward declare.
1649 (tic6x_read_description): New function, based on ...
1650 (tic6x_arch_setup): ... this. Reimplement.
1651 (target_regsets): Rename to ...
1652 (tic6x_regsets): ... this, and make static.
1653 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1654 (tic6x_regs_info): New function.
1655 (the_low_target): Adjust.
1656 (initialize_low_arch): New function.
1657 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1658 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1659 (target_regsets): Rename to ...
1660 (xtensa_regsets): ... this, and make static.
1661 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1663 (xtensa_arch_setup, xtensa_regs_info): New functions.
1664 (the_low_target): Adjust.
1665 (initialize_low_arch): New function.
1666 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1667 (nios2_arch_setup): Set the current process'es tdesc.
1668 (target_regsets): Rename to ...
1669 (nios2_regsets): ... this.
1670 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1671 (nios2_regs_info): New function.
1672 (the_low_target): Adjust.
1673 (initialize_low_arch): New function.
1674 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1675 (aarch64_arch_setup): Set the current process'es tdesc.
1676 (target_regsets): Rename to ...
1677 (aarch64_regsets): ... this.
1678 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1679 (aarch64_regs_info): New function.
1680 (the_low_target): Adjust.
1681 (initialize_low_arch): New function.
1682 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1684 (target_regsets): Rename to ...
1685 (tile_regsets): ... this.
1686 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1687 (tile_regs_info): New function.
1688 (tile_arch_setup): Set the current process'es tdesc.
1689 (the_low_target): Adjust.
1690 (initialize_low_arch): New function.
1691 * spu-low.c (tdesc_spu): Declare.
1692 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1693 * win32-arm-low.c (tdesc_arm): Declare.
1694 (arm_arch_setup): New function.
1695 (the_low_target): Install arm_arch_setup instead of
1697 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1698 (init_windows_x86): Rename to ...
1699 (i386_arch_setup): ... this. Set `win32_tdesc'.
1700 (the_low_target): Adjust.
1701 * win32-low.c (win32_tdesc): New global.
1702 (child_add_thread): Don't create the thread cache here.
1703 (do_initial_child_stuff): Set the new process'es tdesc.
1704 * win32-low.h (struct target_desc): Forward declare.
1705 (win32_tdesc): Declare.
1706 * lynx-i386-low.c (tdesc_i386): Declare global.
1707 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1708 * lynx-low.c (lynx_tdesc): New global.
1709 (lynx_add_process): Set the new process'es tdesc.
1710 * lynx-low.h (struct target_desc): Forward declare.
1711 (lynx_tdesc): Declare global.
1712 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1713 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1714 * nto-low.c (nto_tdesc): New global.
1715 (do_attach): Set the new process'es tdesc.
1716 * nto-low.h (struct target_desc): Forward declare.
1717 (nto_tdesc): Declare.
1718 * nto-x86-low.c (tdesc_i386): Declare.
1719 (nto_x86_arch_setup): Set `nto_tdesc'.
1721 2013-06-04 Gary Benson <gbenson@redhat.com>
1723 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1724 to qSupported response when appropriate.
1725 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1726 with nonzero-length annex.
1727 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1728 arguments supplied in annex.
1730 2013-05-31 Doug Evans <dje@google.com>
1733 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1734 64 bits in 64-cross-32 environment.
1736 2013-05-28 Pedro Alves <palves@redhat.com>
1738 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1739 (aarch64-without-fpu.c): Delete rule.
1740 * configure.srv (aarch64*-*-linux*): Remove references to
1741 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1742 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1745 2013-05-24 Pedro Alves <palves@redhat.com>
1747 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1748 instead of strchr/decode_address. Error if the range isn't split
1749 with a ','. Don't assume there's be a ':' in the action.
1751 2013-05-23 Yao Qi <yao@codesourcery.com>
1752 Pedro Alves <palves@redhat.com>
1754 * linux-low.c (lwp_in_step_range): New function.
1755 (linux_wait_1): If the thread was range stepping and stopped
1756 outside the stepping range, report the stop to GDB. Otherwise,
1757 continue stepping. Add range stepping debug output.
1758 (linux_set_resume_request): Copy the step range from the resume
1760 (linux_supports_range_stepping): New.
1761 (linux_target_ops) <supports_range_stepping>: Set to
1762 linux_supports_range_stepping.
1763 * linux-low.h (struct linux_target_ops)
1764 <supports_range_stepping>: New field.
1765 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1766 * linux-x86-low.c (x86_supports_range_stepping): New.
1767 (the_low_target) <supports_range_stepping>: Set to
1768 x86_supports_range_stepping.
1769 * server.c (handle_v_cont): Handle 'r' action.
1770 (handle_v_requests): Append ";r" if the target supports range
1772 * target.h (struct thread_resume) <step_range_start,
1773 step_range_end>: New fields.
1774 (struct target_ops) <supports_range_stepping>:
1776 (target_supports_range_stepping): New macro.
1778 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1780 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1781 confusion in comment.
1783 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1785 * lynx-low.c (struct process_info_private): New type.
1786 (lynx_add_process): New function.
1787 (lynx_create_inferior, lynx_attach): Replace calls to
1788 add_process by calls to lynx_add_process.
1789 (lynx_resume): If PTID is null, then try using
1790 current_process()->private->last_wait_event_ptid.
1792 (lynx_clear_inferiors): Delete. The contents of that function
1793 has been inlined in lynx_mourn;
1794 (lynx_wait_1): Save the ptid in the process's private data.
1795 (lynx_mourn): Free the process' private data. Replace call
1796 to lynx_clear_inferiors by call to clear_inferiors.
1798 2013-05-17 Yao Qi <yao@codesourcery.com>
1800 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1803 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1805 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1806 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1807 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1808 PT_TEXT_END_ADDR guards. Update comments.
1809 (linux_target_op) <read_offsets>: Conditionally define to
1810 linux_read_offsets if the target is UCLIBC and if it defines
1811 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1813 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1814 Andrew Jenner <andrew@codesourcery.com>
1816 * Makefile.in (SFILES): Add linux-nios2-low.c.
1817 (clean): Add action to delete nios2-linux.c.
1818 (nios2-linux.c): New rule.
1819 * configure.srv: Add nios2*-*-linux*.
1820 * linux-nios2-low.c: New.
1822 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1824 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1826 2013-04-25 Hui Zhu <hui@codesourcery.com>
1829 * ax.c (ax_printf): Add fflush.
1831 2013-04-22 Tom Tromey <tromey@redhat.com>
1833 * Makefile.in (SFILES): Add filestuff.c.
1834 (OBS): Add filestuff.o.
1835 (filestuff.o): New target.
1836 * config.in, configure: Rebuild.
1837 * configure.ac: Check for fdwalk, pipe2.
1839 2013-04-17 Pedro Alves <palves@redhat.com>
1841 * configure.ac (USE_THREAD_DB): Delete variable.
1842 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1843 Don't AC_SUBST USE_THREAD_DB.
1844 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1845 * config.in, configure: Regenerate.
1847 2013-04-16 Pedro Alves <palves@redhat.com>
1849 * linux-low.h (struct lwp_info) <thread_known>: Move under
1850 the USE_THREAD_DB #ifdef.
1852 2013-04-16 Pedro Alves <palves@redhat.com>
1854 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1855 (linux-low.o): Delete rule.
1856 * linux-low.h: Always include "gdb_thread_db.h" instead of
1857 conditionally including thread_db.h.
1858 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1861 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1863 * Makefile.in (install-only): Fix make install regression.
1865 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1867 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1868 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1870 * gdbserver.1: Remove.
1872 2013-03-22 Pedro Alves <palves@redhat.com>
1874 * linux-low.c (handle_extended_wait): Don't call
1875 linux_enable_event_reporting.
1877 2013-03-15 Tony Theodore <tonyt@logyst.com>
1880 * Makefile.in (SHELL): Use @SHELL@.
1882 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1884 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1887 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1889 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1890 Remove extraneous NULL element.
1892 2013-03-13 Yao Qi <yao@codesourcery.com>
1894 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1895 'V' block in trace frame.
1897 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1899 * target.h (struct target_ops): Add btrace ops.
1900 (target_supports_btrace): New macro.
1901 (target_enable_btrace): New macro.
1902 (target_disable_btrace): New macro.
1903 (target_read_btrace): New macro.
1904 * gdbthread.h (struct thread_info): Add btrace field.
1905 * server.c: Include btrace-common.h.
1906 (handle_btrace_general_set): New function.
1907 (handle_btrace_enable): New function.
1908 (handle_btrace_disable): New function.
1909 (handle_general_set): Call handle_btrace_general_set.
1910 (handle_qxfer_btrace): New function.
1911 (struct qxfer qxfer_packets[]): Add btrace entry.
1912 * inferiors.c (remove_thread): Disable btrace.
1913 * linux-low: Include linux-btrace.h.
1914 (linux_low_enable_btrace): New function.
1915 (linux_low_read_btrace): New function.
1916 (linux_target_ops): Add btrace ops.
1917 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1918 Add srv_linux_btrace=yes.
1919 (x86_64-*-linux*): Add linux-btrace.o.
1920 Add srv_linux_btrace=yes.
1921 * configure.ac: Define HAVE_LINUX_BTRACE.
1922 * config.in: Regenerated.
1923 * configure: Regenerated.
1925 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1927 * server.c (handle_qxfer): Preserve error message if -3 is
1929 (qxfer): Document the -3 return value.
1931 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1933 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1934 (linux_btrace_h): New variable.
1935 (linux-btrace.o): New rule.
1937 2013-03-08 Stan Shebs <stan@codesourcery.com>
1938 Hafiz Abid Qadeer <abidh@codesourcery.com>
1940 * tracepoint.c (trace_buffer_size): New global.
1941 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1942 (init_trace_buffer): Change to one-argument function. Allocate
1943 trace buffer memory.
1944 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1945 handle QTBuffer:size packet.
1946 (cmd_bigqtbuffer_size): New function.
1947 (initialize_tracepoint): Call init_trace_buffer with
1948 DEFAULT_TRACE_BUFFER_SIZE.
1949 * server.c (handle_query): Add QTBuffer:size in the
1952 2013-03-07 Yao Qi <yao@codesourcery.com>
1954 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1955 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1957 (cmd_qtsp): Adjust condition. Do post increment.
1958 Set cur_action and cur_step_action back to 0.
1960 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1963 * linux-low.c (linux_write_memory): Return early success if LEN is
1966 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1968 * configure.srv: Add x86_64-*-cygwin* as target.
1970 2013-02-28 Tom Tromey <tromey@redhat.com>
1972 * configure.ac: Invoke AC_SYS_LARGEFILE.
1973 * configure, config.in: Rebuild.
1975 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1977 * win32-low.c: Throughout, fix format strings and casts of
1978 printf-like functions to avoid type related warnings on all
1980 (get_child_debug_event): Print dwDebugEventCode as hex since
1981 that's how it's usually documented.
1983 2013-02-28 Yao Qi <yao@codesourcery.com>
1985 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1988 2013-02-27 Jiong Wang <jiwang@tilera.com>
1990 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1991 (reg-tilegx32.c): New rule.
1992 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1993 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1994 different register info initializer according to elf class.
1995 (init_registers_tilgx32): New function. The tilegx32 register info
1997 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1998 (tile_store_gregset): Likewise.
2000 2013-02-27 Yao Qi <yao@codesourcery.com>
2002 * server.c (process_point_options): Print debug message when
2003 debug_threads is true.
2005 2013-02-26 Yao Qi <yao@codesourcery.com>
2007 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2009 2013-02-19 Pedro Alves <palves@redhat.com>
2010 Kai Tietz <ktietz@redhat.com>
2014 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2015 instead of strtoul to extract address from packet.
2016 (process_serial_event) <'z'>: Likewise.
2018 2013-02-18 Yao Qi <yao@codesourcery.com>
2020 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2022 2013-02-14 Pedro Alves <palves@redhat.com>
2026 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2027 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2029 2013-02-14 Pedro Alves <palves@redhat.com>
2031 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2033 2013-02-14 Pedro Alves <palves@redhat.com>
2035 * tracepoint.c (save_string): Delete.
2036 (add_tracepoint_action): Use savestring instead of save_string.
2038 2013-02-12 Pedro Alves <palves@redhat.com>
2040 * linux-xtensa-low.c: Ditto.
2041 * xtensa-xtregs.c: Ditto.
2043 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2045 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2048 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2050 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2051 aarch64_num_wp_regs and aarch64_num_bp_regs to
2052 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2054 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2056 * linux-aarch64-low.c (ps_get_thread_area): Replace
2057 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2059 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2060 Marcus Shawcroft <marcus.shawcroft@arm.com>
2061 Nigel Stephens <nigel.stephens@arm.com>
2062 Yufeng Zhang <yufeng.zhang@arm.com>
2064 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2065 (aarch64.c, aarch64-without-fpu.c): New targets.
2066 * configure.srv (aarch64*-*-linux*): New.
2067 * linux-aarch64-low.c: New file.
2069 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2071 * linux-low.c (handle_extended_wait, linux_create_inferior)
2072 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2073 (dequeue_one_deferred_signal, linux_resume_one_thread)
2074 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2075 (linux_tracefork_grandchild, linux_test_for_tracefork)
2076 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2077 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2078 where the argument is 0.
2080 2013-01-25 Yao Qi <yao@codesourcery.com>
2082 * event-loop.c: Include "queue.h".
2083 (gdb_event_p): New typedef.
2084 (struct gdb_event) <next_event>: Remove.
2085 (event_queue): Change to QUEUE(gdb_event_p).
2086 (async_queue_event): Remove.
2087 (gdb_event_xfree): New.
2088 (initialize_event_loop): New.
2089 (process_event): Use API from QUEUE.
2090 (wait_for_event): Likewise.
2091 * server.c (main): Call initialize_event_loop.
2092 * server.h (initialize_event_loop): Declare.
2094 2013-01-18 Yao Qi <yao@codesourcery.com>
2096 * ax.h (struct eval_agent_expr_context): New.
2097 (gdb_eval_agent_expr): Update declaration.
2098 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2099 TFRAME. Add new argument CTX.
2100 * server.h (struct eval_agent_expr_context): Declare.
2101 (agent_mem_read, agent_tsv_read): Update declaration.
2102 (agent_mem_read_string): Likewise.
2103 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2104 (add_traceframe_block): Add new argument TPOINT.
2105 Increase TPOINT->traceframe_usage.
2106 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2107 eval_tracepoint_agent_expr.
2108 (condition_true_at_tracepoint): Likewise.
2109 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2110 (agent_mem_read_string, agent_tsv_read): Likewise.
2112 2013-01-16 Yao Qi <yao@codesourcery.com>
2114 * linux-low.c (linux_resume_one_lwp): Don't check
2115 'lwp->bp_reinsert != 0'.
2117 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2118 Pedro Alves <palves@redhat.com>
2120 * lynx-low.c (ptrace_request_to_str): Define a temporary
2121 macro and use it to simplify this function's implementation.
2123 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2125 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2128 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2130 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2134 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2136 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2138 * lynx-low.c (lynx_resume): Use the resume_info parameter
2139 to determine the ptid for the lynx_ptrace call, unless
2140 it is equal to minus_one_ptid, in which case we use the
2141 ptid of the current_inferior.
2142 (lynx_wait_1): After having received a thread create/exit
2143 event, resume the inferior's execution using the signaling
2144 thread's ptid, rather than the old ptid.
2146 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2148 * lynx-low.c (lynx_resume): Delete variable ret.
2150 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2152 * gdbreplay.c (gdbreplay_version): Update copyright year.
2153 * server.c (gdbserver_version): Likewise.
2155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2157 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2160 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2162 * lynx-low.c (ptrace_request_to_str): Add handling for
2165 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2167 * lynx-low.c (lynx_attach): Delete variable new_process.
2169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2171 * lynx-low.c (lynx_create_inferior): Delete variable
2174 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2176 * lynx-low.c (ptrace_request_to_str): Do not handle
2177 PTRACE_GETTHREADLIST if this macro does not exist.
2179 2012-12-15 Yao Qi <yao@codesourcery.com>
2181 * Makefile.in (OBS): Add notif.o.
2182 * notif.c, notif.h: New.
2183 * server.c: Include "notif.h".
2184 (struct vstop_notif) <next>: Remove.
2186 (queue_stop_reply): Update.
2187 (push_event, send_next_stop_reply): Remove.
2188 (discard_queued_stop_replies): Update.
2189 (notif_stop): New variable.
2190 (handle_v_stopped): Remove.
2191 (handle_v_requests): Don't call handle_v_stopped. Call
2192 handle_ack_notif instead.
2193 (queue_stop_reply_callback): Call notif_event_enque instead
2194 of queue_stop_reply.
2195 (handle_status): Don't call send_next_stop_reply, call
2196 notif_write_event instead.
2197 (kill_inferior_callback): Likewise.
2198 (detach_or_kill_inferior_callback): Likewise.
2199 (main): Call initialize_notif.
2200 (process_serial_event): Call QUEUE_is_empty.
2201 (handle_target_event): Call notif_push instead of push event.
2202 * server.h (push_event): Remove declaration.
2204 2012-12-10 Tom Tromey <tromey@redhat.com>
2206 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2207 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2210 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2211 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2212 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2213 (amd64-linux-ipa.o, ax.o): Rewrite.
2214 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2215 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2216 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2217 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2218 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2219 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2220 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2221 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2222 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2223 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2224 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2225 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2226 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2227 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2228 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2229 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2230 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2231 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2232 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2233 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2234 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2235 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2236 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2237 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2238 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2239 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2240 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2241 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2242 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2243 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2244 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2245 (reg-tilegx.o): Remove.
2246 (all_object_files): New macro.
2247 Include .deps files.
2248 * aclocal.m4, configure: Rebuild.
2249 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2250 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2251 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2253 2012-12-05 Tom Tromey <tromey@redhat.com>
2256 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2258 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2260 * configure.ac: Check for linux/perf_event.h.
2261 * config.in: Regenerated.
2262 * configure: Regenerated.
2264 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2266 * hostio.c (handle_readlink): Decrease buffer size
2267 parameter passed to readlink by one byte.
2269 2012-11-26 Yao Qi <yao@codesourcery.com>
2271 * configure.ac (build_warnings): Append '-Wempty-body'.
2272 * configure: Regenerated.
2273 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2276 2012-11-15 Pierre Muller <muller@sourceware.org>
2278 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2279 * config.in: Regenerate.
2280 * configure: Regenerate.
2281 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2282 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2283 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2284 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2286 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2287 instead of <sys/wait.h> header.
2288 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2290 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2292 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2293 (various make rules): Remove -DGDBSERVER
2295 2012-11-09 Yao Qi <yao@codesourcery.com>
2297 * spu-low.c (current_ptid): Move it to ..
2298 * gdbthread.h: ... here. New.
2299 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2300 * server.c (myresume, process_serial_event): Likewise.
2301 * thread-db.c (thread_db_find_new_threads): Likewise.
2302 * tracepoint.c (run_inferior_command): Likewise.
2304 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2306 * server.c (handle_search_memory_1): Include access length in
2309 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2311 * linux-crisv32-low.c: Fix compile errors.
2313 2012-09-04 Yao Qi <yao@codesourcery.com>
2315 * tracepoint.c (cmd_qtsv): Adjust debug message.
2316 Don't check CUR_TPOINT.
2318 2012-08-28 Yao Qi <yao@codesourcery.com>
2320 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2321 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2322 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2323 Remove declarations of xmalloc, xreallloc, xstrdup and
2325 * Makefile.in (libiberty_h): New.
2326 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2327 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2329 2012-08-23 Yao Qi <yao@codesourcery.com>
2331 * server.h: Remove declaration of 'xsnprintf'.
2333 2012-08-22 Keith Seitz <keiths@redhat.com>
2335 * server.h: Include build-gnulib-gbserver/config.h.
2336 * gdbreplay.c: Likewise.
2338 2012-08-08 Doug Evans <dje@google.com>
2340 * Makefile.in (SFILES): Add gdb_vecs.c.
2341 (OBS): Add gdb_vecs.o.
2342 (gdb_vecs_h, host_defs_h): New variables.
2343 (thread-db.o): Add $(gdb_vecs_h) dependency.
2344 (gdb_vecs.o): New rule.
2345 * thread-db.c: #include "gdb_vecs.h".
2346 (thread_db_load_search): Use a vector to iterate over path elements.
2347 Handle text appearing after "$pdir".
2349 * configure.ac: Add check for strstr.
2350 * config.in: Regenerate.
2351 * configure: Regenerate.
2353 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2355 * hostio.c (handle_pread): If pread fails, fall back to attempting
2357 (handle_pwrite): Likewise for pwrite.
2359 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2361 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2362 between unsupported TYPE and unimplementable ADDR/LEN combination.
2363 (arm_insert_point): Act on new return value.
2365 2012-07-31 Pedro Alves <palves@redhat.com>
2367 * server.c (process_point_options): Only skip tokens if we find
2368 one that is unrecognized. Don't treat 'X' specially while
2369 skipping unrecognized tokens.
2371 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2373 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2374 to 4-byte-align HW breakpoint addresses for Thumb.
2376 2012-07-27 Yao Qi <yao@codesourcery.com>
2380 * server.h: Declare gdb_agent_about_to_close.
2381 * target.c (kill_inferior): Include "agent.h".
2382 New. Send command 'kill'.
2383 * target.h (kill_inferior): Removed macro.
2384 * tracepoint.c (gdb_agent_about_to_close): New.
2385 (gdb_agent_helper_thread): Handle command 'close'.
2386 Wait endlessly until the inferior stops.
2387 Install gdb_agent_remove_socket to atexit hook.
2388 (agent_socket_name): New static variable.
2389 (gdb_agent_socket_init): Replace local variable 'name' with
2390 'agent_socket_name'.
2391 (gdb_agent_remove_socket): New.
2393 2012-07-27 Yao Qi <yao@codesourcery.com>
2395 * server.c (process_point_options): Stop at 'X' when parsing.
2397 2012-07-19 Michael Eager <eager@eagercon.com>
2399 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2401 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2402 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2403 hardware breakpoint.
2405 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2407 * gdbserver/linux-low.c (initialize_low): Call
2408 linux_ptrace_init_warnings.
2410 2012-07-02 Doug Evans <dje@google.com>
2412 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2415 2012-07-02 Stan Shebs <stan@codesourcery.com>
2417 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2418 (ax.o): Add it to build rule.
2420 (OBS): Add format.o.
2421 (IPA_OBS): Add format.o.
2422 * server.c (handle_query): Claim support for breakpoint commands.
2423 (process_point_options): Add command case.
2424 (process_serial_event): Leave running if there are printfs in
2426 * mem-break.h (any_persistent_commands): Declare.
2427 (add_breakpoint_commands): Declare.
2428 (gdb_no_commands_at_breakpoint): Declare.
2429 (run_breakpoint_commands): Declare.
2430 * mem-break.c (struct point_command_list): New struct.
2431 (struct breakpoint): New field command_list.
2432 (any_persistent_commands): New function.
2433 (add_commands_to_breakpoint): New function.
2434 (add_breakpoint_commands): New function.
2435 (gdb_no_commands_at_breakpoint): New function.
2436 (run_breakpoint_commands): New function.
2437 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2439 * ax.c: Include format.h.
2440 (ax_printf): New function.
2441 (gdb_eval_agent_expr): Add printf opcode.
2443 2012-06-13 Yao Qi <yao@codesourcery.com>
2445 * server.c (start_inferior): Remove duplicated writes to fields
2446 'last_resume_kind' and 'last_status' of 'current_inferior'.
2448 2012-06-12 Yao Qi <yao@codesourcery.com>
2449 Pedro Alves <palves@redhat.com>
2451 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2453 * server.c (handle_v_cont): Extend comment.
2455 2012-06-11 Yao Qi <yao@codesourcery.com>
2457 * linux-low.c (linux_attach): Add 'static'.
2459 2012-06-06 Yao Qi <yao@codesourcery.com>
2461 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2463 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2465 Fix gcc -flto compilation warning.
2466 * server.c (main): Make variable multi_mode and attach volatile.
2468 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2470 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2471 if the platform doesn't know about it.
2473 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2475 * Makefile.in (SFILES): Add linux-tile-low.c.
2476 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2477 * configure.srv: Handle tilegx-*-linux*.
2478 * linux-tile-low.c: New file.
2480 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2482 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2484 2012-05-24 Pedro Alves <palves@redhat.com>
2488 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2490 2012-05-24 Pedro Alves <palves@redhat.com>
2494 Replace target_signal with gdb_signal throughout.
2496 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2498 * linux-low.c (linux_store_registers): Avoid the copying sequence
2499 when no data has been retrieved by ptrace.
2501 2012-05-22 Will Deacon <will.deacon@arm.com>
2503 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2504 Include asm/ptrace.h.
2505 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2508 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2510 * linux-low.c (linux_store_registers): Don't re-retrieve data
2511 with ptrace that has already been obtained from /proc. Always
2512 copy any data retrieved with ptrace to the buffer supplied.
2514 2012-05-11 Yao Qi <yao@codesourcery.com>
2515 Pedro Alves <palves@redhat.com>
2517 * linux-low.c (enum stopping_threads_kind): New.
2518 (stopping_threads): Change type to `enum stopping_threads_kind'.
2519 (handle_extended_wait): If stopping and suspending threads, leave
2520 the new_lwp suspended too.
2521 (linux_wait_for_event): Adjust.
2522 (stop_all_lwps): Set `stopping_threads' to
2523 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2524 whether we're suspending threads or just stopping them. Assert no
2527 2012-04-29 Yao Qi <yao@codesourcery.com>
2529 * server.h: Move some code to ...
2530 * gdbthread.h: ... here. New.
2531 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2532 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2533 (nto-low.o, win32-low.o): Likewise.
2534 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2535 * regcache.c, remote-utils.c, server.c: Likewise.
2536 * target.c, tracepoint.c, win32-low.c: Likewise.
2538 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2540 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2541 (PTRACE_ARG4_TYPE): Likewise.
2542 (PTRACE_XFER_TYPE): Likewise.
2543 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2544 ptrace to PTRACE_ARG3_TYPE.
2545 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2546 (PTRACE_ARG4_TYPE): Likewise.
2547 (PTRACE_XFER_TYPE): Likewise.
2548 (linux_detach_one_lwp): Cast fourth argument of
2549 ptrace to long then PTRACE_ARG4_TYPE.
2550 (regsets_fetch_inferior_registers): Cast third argument of
2551 ptrace to long then PTRACE_ARG3_TYPE.
2552 (regsets_store_inferior_registers): Likewise.
2554 2012-04-20 Pedro Alves <palves@redhat.com>
2556 * configure: Regenerate.
2558 2012-04-19 Pedro Alves <palves@redhat.com>
2560 * Makefile.in (GNULIB_BUILDDIR): New.
2561 (LIBGNU, INCGNU, GNULIB_H): Adjust.
2562 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2563 (all, install-only, uninstall, clean-info, all-lib, clean): No
2564 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2565 (maintainer-clean realclean distclean): Use subdir_do.
2567 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
2568 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
2569 * acinclude.m4: Include acx_configure_dir.m4.
2570 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2571 calls. Call AC_PROG_RANLIB. Configure gnulib using
2574 (GNULIB_STDINT_H): Adjust.
2575 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2576 * gdbreplay.c: Include build-gnulib/config.h.
2577 * server.h: Likewise.
2578 * aclocal.m4: Regenerate.
2579 * config.in: Regenerate.
2580 * configure: Regenerate.
2582 2012-04-19 Pedro Alves <palves@redhat.com>
2584 * Makefile.in (LIBGNU, INCGNU): Adjust.
2585 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2586 (all, install-only, uninstall, clean-info, all-lib, clean)
2587 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2588 * configure.ac: Adjust AC_OUTPUT output.
2589 * aclocal.m4: Regenerate.
2590 * configure: Regenerate.
2592 2012-04-19 Pedro Alves <palves@redhat.com>
2594 * Makefile.in (generated_files): New.
2595 (server_h): Remove the explicit dependency on config.h, and depend
2596 on $generated_files.
2598 2012-04-19 Pedro Alves <palves@redhat.com>
2600 * Makefile.in (INCGNU): Add -Ignulib.
2602 2012-04-19 Pedro Alves <palves@redhat.com>
2604 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2605 (INCGNU): ... this, and spell out -I here.
2606 (GNULIB_LIB): Rename to ...
2608 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2610 2012-04-19 Pedro Alves <palves@redhat.com>
2612 * config.in: Regenerate.
2614 2012-04-19 Pedro Alves <palves@redhat.com>
2616 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2617 * server.h (memmem): Remove declaration.
2618 * config.in: Regenerate.
2619 * configure: Regenerate.
2621 2012-04-19 Yao Qi <yao@codesourcery.com>
2623 * Makefile.in (SFILES): Add common/vec.c.
2627 2012-04-19 Yao Qi <yao@codesourcery.com>
2629 * remote-utils.c (prepare_resume_reply): Replace with macro
2630 target_core_of_thread.
2631 * server.c (handle_qxfer_threads_proper): Likewise.
2632 * target.h (traget_core_of_thread): New macro.
2634 2012-04-18 Pedro Alves <palves@redhat.com>
2636 * aclocal.m4: Regenerate.
2637 * configure: Regenerate.
2639 2012-04-16 Yao Qi <yao@codesourcery.com>
2641 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2642 duplicated on address.
2644 2012-04-16 Yao Qi <yao@codesourcery.com>
2646 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2647 (struct tracepoint_action_ops) <send>: New field.
2648 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2649 (agent_expr_send, x_tracepoint_action_send): New.
2650 (l_tracepoint_action_send): New.
2651 (cmd_qtdp): Download and install tracepoint
2652 according to `use_agent'.
2653 (run_inferior_command): Add one more parameter `len'.
2655 (tracepoint_send_agent): New.
2656 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2658 2012-04-16 Yao Qi <yao@codesourcery.com>
2660 * tracepoint.c (download_tracepoints): Moved to ...
2661 (cmd_qtstart): ... here.
2663 2012-04-14 Yao Qi <yao@codesourcery.com>
2665 * tracepoint.c: Include inttypes.h.
2666 (struct collect_memory_action): Use sized types.
2667 (struct tracepoint): Likewise.
2668 (cmd_qtdp, stop_tracing): Update print specifiers.
2669 (cmd_qtp, response_tracepoint): Likewise.
2670 (collect_data_at_tracepoint): Likewise.
2671 (collect_data_at_step): Likewise.
2673 2012-04-14 Yao Qi <yao@codesourcery.com>
2675 Import gnulib module inttypes.
2676 * aclocal.m4, config.in, configure: Regenerated.
2678 2012-04-14 Yao Qi <yao@codesourcery.com>
2680 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2681 Makefile and config.status at last.
2683 2012-04-13 Yao Qi <yao@codesourcery.com>
2685 * tracepoint.c: Include stdint.h unconditionally.
2687 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2689 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2690 on BFD_HAVE_SYS_PROCFS_TYPE.
2691 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2692 * configure: Regenerate.
2693 * config.in: Likewise.
2695 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2697 * Makefile.in (clean): Also remove x32.c x32-linux.c
2698 x32-avx.c x32-avx-linux.c.
2699 (x32.o): New target.
2701 (x32-linux.o): Likewise.
2702 (x32-linux.c): Likewise.
2703 (x32-avx.o): Likewise.
2704 (x32-avx.c): Likewise.
2705 (x32-avx-linux.o): Likewise.
2706 (x32-avx-linux.c): Likewise.
2708 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2709 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2710 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2711 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2712 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2713 i386/x32-avx-linux.xml.
2715 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2716 (init_registers_x32_avx_linux): Likwise.
2717 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2718 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2720 2012-04-13 Pedro Alves <palves@redhat.com>
2722 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2723 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2724 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2725 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2728 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2730 * linux-x86-low.c (compat_x32_clock_t): New.
2731 (compat_x32_siginfo_t): Likewise.
2732 (compat_x32_siginfo_from_siginfo): Likewise.
2733 (siginfo_from_compat_x32_siginfo): Likewise.
2734 (linux_is_elf64): Likewise.
2735 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2736 and siginfo_from_compat_x32_siginfo for x32.
2737 (x86_arch_setup): Set linux_is_elf64.
2739 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2742 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2744 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2745 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2746 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2747 compatible with process.
2749 2012-04-12 Yao Qi <yao@codesourcery.com>
2751 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2752 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2753 (install-only, install-info, clean): Handle sub dir gnulib.
2754 (all-lib, am--refresh): New targets.
2755 (memmem.o): Remove target.
2756 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2757 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2758 (AC_REPLACE_FUNCS): Remove memmem.
2759 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2760 (AC_OUTPUT): Generate Makefile in gnulib/.
2761 * aclocal.m4, config.in, configure: Regenerated.
2763 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2767 2012-04-05 Pedro Alves <palves@redhat.com>
2769 -Werror=strict-aliasing
2771 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2774 2012-04-04 Pedro Alves <palves@redhat.com>
2776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2777 (sparc_store_gregset_from_stack, sparc_store_gregset)
2778 (sparc_breakpoint_at): Fix formatting.
2780 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2782 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2784 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2785 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2786 * config.in: Regenerate.
2787 * configure: Likewise.
2789 2012-03-29 Pedro Alves <palves@redhat.com>
2791 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2792 Correct ptrace arguments.
2794 2012-03-28 Pedro Alves <palves@redhat.com>
2796 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2797 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2798 (IA64_FR1_REGNUM): New defines.
2799 (ia64_fetch_register): New.
2800 (the_low_target): Install it.
2801 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2803 * linux-low.c (linux_fetch_registers): Try the
2804 the_low_target.fetch_register hook first.
2806 * linux-arm-low.c (the_low_target): Adjust.
2807 * linux-bfin-low.c (the_low_target): Adjust.
2808 * linux-cris-low.c (the_low_target): Adjust.
2809 * linux-crisv32-low.c (the_low_target): Adjust.
2810 * linux-m32r-low.c (the_low_target): Adjust.
2811 * linux-m68k-low.c (the_low_target): Adjust.
2812 * linux-mips-low.c (the_low_target): Adjust.
2813 * linux-ppc-low.c (the_low_target): Adjust.
2814 * linux-s390-low.c (the_low_target): Adjust.
2815 * linux-sh-low.c (the_low_target): Adjust.
2816 * linux-sparc-low.c (the_low_target): Adjust.
2817 * linux-tic6x-low.c (the_low_target): Adjust.
2818 * linux-x86-low.c (the_low_target): Adjust.
2819 * linux-xtensa-low.c (the_low_target): Adjust.
2821 2012-03-26 Pedro Alves <palves@redhat.com>
2823 * server.c (handle_qxfer_libraries): Don't bail early if
2824 the_target->qxfer_libraries_svr4 is not NULL.
2826 2012-03-26 Pedro Alves <palves@redhat.com>
2828 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2830 2012-03-23 Pedro Alves <palves@redhat.com>
2832 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2833 "library-list-svr4" element's start tag when the the DSO list is
2836 2012-03-23 Pedro Alves <palves@redhat.com>
2838 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2839 a variable whose type size is the same as the inferior's pointer
2842 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2844 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2846 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2847 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2848 * linux-low.h: Include <signal.h>.
2849 (struct siginfo): Remove forward declaration.
2850 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2853 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2855 * .gitignore: Ignore more files.
2857 2012-03-19 Pedro Alves <palves@redhat.com>
2858 Jan Kratochvil <jan.kratochvil@redhat.com>
2860 * server.c (cont_thread, general_thread): Add describing comments.
2861 (start_inferior): Clear `cont_thread'.
2862 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2865 2012-03-15 Yao Qi <yao@codesourcery.com>
2867 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2869 (cmd_qtdp): ... here.
2871 2012-03-15 Yao Qi <yao@codesourcery.com>
2873 * tracepoint.c (struct tracepoint_action_ops): New.
2874 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2875 (m_tracepoint_action_download): New.
2876 (r_tracepoint_action_download): New.
2877 (x_tracepoint_action_download): New.
2878 (l_tracepoint_action_download): New.
2879 (add_tracepoint_action): Install `action->ops' according type.
2880 (download_tracepoint_1): Move code `download' function pointer
2881 of various tracepoint_action_ops.
2883 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2885 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2886 linux_ptrace_attach_warnings.
2888 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2890 * Makefile.in (linux-ptrace.o): New.
2891 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2892 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2893 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2894 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2895 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2897 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2899 2012-03-08 Yao Qi <yao@codesourcery.com>
2900 Pedro Alves <palves@redhat.com>
2902 Fix PR server/13392.
2903 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2905 * tracepoint.c (remove_tracepoint): New.
2906 (cmd_qtdp): Call remove_tracepoint when failed to install.
2908 2012-03-07 Pedro Alves <palves@redhat.com>
2910 * linux-low.c (get_detach_signal): New.
2911 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2912 Pass on pending signals to PTRACE_DETACH. Check the result of the
2914 * server.c (program_signals, program_signals_p): New.
2915 (handle_general_set): Handle QProgramSignals.
2916 * server.h (program_signals, program_signals_p): Declare.
2918 2012-03-05 Pedro Alves <palves@redhat.com>
2919 Jan Kratochvil <jan.kratochvil@redhat.com>
2921 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2924 2012-03-03 Yao Qi <yao@codesourcery.com>
2926 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2927 agent_look_up_symbols.
2929 2012-03-03 Yao Qi <yao@codesourcery.com>
2931 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2932 (linux-x86-low.o): Likewise.
2933 * server.h: Remove in_process_agent_loaded.
2934 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2938 2012-03-03 Yao Qi <yao@codesourcery.com>
2940 * tracepoint.c (gdb_agent_capability): New global.
2941 (in_process_agent_loaded_ust): Renamed to
2942 `in_process_agent_supports_ust'.
2944 (in_process_agent_supports_ust): Call agent_capability_check.
2945 (clear_installed_tracepoints): Assert that agent supports
2948 2012-03-03 Yao Qi <yao@codesourcery.com>
2950 * linux-low.c (linux_supports_agent): New.
2951 (linux_target_ops): Initialize field `supports_agent' with
2952 linux_supports_agent.
2953 * target.h (struct target_ops) <supports_agent>: New.
2954 (target_supports_agent): New macro.
2955 * server.c (handle_general_set): Handle packet 'QAgent'.
2956 (handle_query): Send `QAgent+'.
2957 * Makefile.in (server.o): Depends on agent.h.
2959 2012-03-03 Yao Qi <yao@codesourcery.com>
2961 * Makefile.in (OBS): Add agent.o.
2962 Add new rule for agent.o.
2963 Track dependence of tracepoint.c on agent.h.
2964 * tracepoint.c (run_inferior_command_1):
2965 (run_inferior_command): Call agent_run_command.
2966 (gdb_ust_connect_sync_socket): Deleted. Move it to
2968 (resume_thread, stop_thread): Likewise.
2969 (gdb_ust_socket_init): Renamed to ...
2970 (gdb_agent_socket_init): ... New.
2971 (gdb_ust_thread): Renamed to ...
2972 (gdb_agent_helper_thread): ... New.
2973 (gdb_ust_init): Move some code to ...
2974 (gdb_agent_init): ... here. New.
2975 [HAVE_UST]: Call gdb_ust_init.
2976 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2977 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2978 * config.in, configure: Regenerated.
2980 2012-03-02 Pedro Alves <palves@redhat.com>
2982 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2983 * linux-low.c (struct simple_pid_list): New.
2984 (stopped_pids): New a struct simple_pid_list pointer.
2985 (add_to_pid_list, pull_pid_from_list): New.
2986 (handle_extended_wait): Don't assume the first signal new children
2987 report is SIGSTOP. Adjust call to pull_pid_from_list.
2988 (linux_wait_for_lwp): Adjust.
2990 2012-03-02 Yao Qi <yao@codesourcery.com>
2992 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2995 2012-03-02 Yao Qi <yao@codesourcery.com>
2997 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2998 `stop_pc' and `tpoint'. Update caller.
3000 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3002 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3003 * linux-low.c (use_linux_regsets): New macro.
3004 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3005 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3006 (linux_register_in_regsets): New function.
3007 (usr_fetch_inferior_registers): Skip registers covered by
3009 (usr_store_inferior_registers): Likewise.
3010 (usr_fetch_inferior_registers): New macro.
3011 (usr_store_inferior_registers): Likewise.
3012 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3013 (linux_store_registers): Likewise.
3014 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3016 (init_registers_mips64_dsp_linux): Likewise.
3017 (init_registers_mips_linux): New macro.
3018 (init_registers_mips_dsp_linux): Likewise.
3019 (mips_dsp_num_regs): Likewise.
3020 (DSP_BASE, DSP_CONTROL): New fallback macros.
3021 (mips_base_regs): New macro.
3022 (mips_regmap): Use it. Fix the size.
3023 (mips_dsp_regmap): New variable.
3024 (mips_dsp_regset_bitmap): Likewise.
3025 (mips_arch_setup): New function.
3026 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3028 (mips_cannot_store_register): Likewise.
3029 (the_low_target): Update .arch_setup, .num_regs and .regmap
3030 initializers. Add .regset_bitmap initializer.
3031 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3033 * linux-bfin-low.c (the_low_target): Likewise.
3034 * linux-cris-low.c (the_low_target): Likewise.
3035 * linux-crisv32-low.c (the_low_target): Likewise.
3036 * linux-ia64-low.c (the_low_target): Likewise.
3037 * linux-m32r-low.c (the_low_target): Likewise.
3038 * linux-m68k-low.c (the_low_target): Likewise.
3039 * linux-ppc-low.c (the_low_target): Likewise.
3040 * linux-s390-low.c (the_low_target): Likewise.
3041 * linux-sh-low.c (the_low_target): Likewise.
3042 * linux-sparc-low.c (the_low_target): Likewise.
3043 * linux-tic6x-low.c (the_low_target): Likewise.
3044 * linux-x86-low.c (the_low_target): Likewise.
3045 * linux-xtensa-low.c (the_low_target): Likewise.
3046 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3047 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3048 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3050 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3051 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3053 2012-02-29 Yao Qi <yao@codesourcery.com>
3054 Pedro Alves <palves@redhat.com>
3056 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3057 `step_over_finished' is true.
3059 2012-02-27 Pedro Alves <palves@redhat.com>
3061 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3062 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3064 2012-02-27 Pedro Alves <palves@redhat.com>
3067 * linux-low.c (pid_is_stopped): New.
3068 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3070 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3072 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3075 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3077 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3079 2012-02-24 Luis Machado <lgustavo@codesourcery>
3081 * server.c (handle_query): Advertise support for target-side
3082 breakpoint condition evaluation.
3083 (process_point_options): New function.
3084 (process_serial_event): When inserting a breakpoint, check for
3085 a target-side condition that should be evaluated.
3087 * mem-break.c: Include regcache.h and ax.h.
3088 (point_cond_list_t): New data structure.
3089 (breakpoint) <cond_list>: New field.
3090 (find_gdb_breakpoint_at): Make non-static.
3091 (delete_gdb_breakpoint_at): Clear any target-side
3093 (clear_gdb_breakpoint_conditions): New function.
3094 (add_condition_to_breakpoint): Likewise.
3095 (add_breakpoint_condition): Likewise.
3096 (gdb_condition_true_at_breakpoint): Likewise.
3097 (gdb_breakpoint_here): Return result directly instead
3098 of going through a local variable.
3100 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3101 (clear_gdb_breakpoint_conditions): Likewise.
3102 (add_breakpoint_condition): Likewise.
3103 (gdb_condition_true_at_breakpoint): Likewise.
3105 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3106 (need_step_over_p): Take target-side breakpoint condition into
3109 2012-02-24 Luis Machado <lgustavo@codesourcery>
3111 * server.h: Include tracepoint.h.
3112 (agent_mem_read, agent_get_trace_state_variable_value,
3113 agent_set_trace_state_variable_value,
3114 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3115 get_set_tsv_func_addr): New prototypes.
3117 * ax.h: New include file.
3118 * ax.c: New source file.
3120 * tracepoint.c: Include ax.h.
3121 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3122 agent_expr, eval_result_type): Move to ax.h.
3123 (parse_agent_expr): Rename to ...
3124 (gdb_parse_agent_expr): ... this, make it non-static and move
3126 (unparse_agent_expr) Rename to ...
3127 (gdb_unparse_agent_expr): ... this, make it non-static and move
3129 (eval_agent_expr): Rename to ...
3130 (eval_tracepoint_agent_expr): ... this.
3131 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3132 forward declarations.
3133 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3134 (agent_get_trace_state_variable_value): New function.
3135 (agent_set_trace_state_variable_value): New function.
3136 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3137 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3138 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3139 (condition_true_at_tracepoint): Likewise.
3140 (parse_agent_expr): Rename to ...
3141 (gdb_parse_agent_expr): ... this and move to ax.c.
3142 (unparse_agent_expr): Rename to ...
3143 (gdb_unparse_agent_expr): ... this and move to ax.c.
3144 (gdb_agent_op_name): Move to ax.c.
3145 (eval_agent_expr): Rename to ...
3146 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3148 (eval_tracepoint_agent_expr): New function.
3149 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3151 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3153 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3154 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3155 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3156 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3157 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3158 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3159 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3160 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3161 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3162 (compile_bytecodes): Remove forward declaration.
3163 (is_goto_target): Move to ax.c.
3164 (compile_bytecodes): Move to ax.c and call
3165 agent_get_trace_state_variable_value (...) and
3166 agent_set_trace_state_variable_value (...).
3168 * Makefile.in: Update ax.c and IPA dependencies.
3170 2012-02-24 Pedro Alves <palves@redhat.com>
3172 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3173 (cmd_bigqtbuffer_circular): ... this. Only handle
3174 'QTBuffer:circular:'.
3175 (handle_tracepoint_general_set): Adjust.
3177 2012-02-16 Yao Qi <yao@codesourcery.com>
3179 * inferiors.c: Move code to ...
3180 * dll.c: .... here. New.
3181 * server.h: Declare clear_dlls.
3182 * Makefile.in (SFILES): Add dll.c.
3186 2012-02-11 Yao Qi <yao@codesourcery.com>
3188 * server.c: (handle_monitor_command): Add a new parameter
3190 (handle_query): Update caller.
3192 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3194 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3195 * configure, config.in: Regenerate.
3196 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3199 2012-02-02 Pedro Alves <palves@redhat.com>
3201 Try SIGKILL first, then PTRACE_KILL.
3202 * linux-low.c (linux_kill_one_lwp): New.
3203 (linux_kill_one_lwp): Rename to ...
3204 (kill_one_lwp_callback): ... this. Use the new
3207 2012-02-02 Pedro Alves <palves@redhat.com>
3209 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3212 2012-01-27 Pedro Alves <palves@redhat.com>
3214 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3215 (elf_64_file_p): Make static.
3216 (linux_pid_exe_is_elf_64_file): New.
3217 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3218 Delete declarations.
3219 (linux_pid_exe_is_elf_64_file): Declare.
3220 * linux-x86-low.c (x86_arch_setup): Use
3221 linux_pid_exe_is_elf_64_file.
3223 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3225 * linux-low.c (linux_wait_for_event_1): Rename to ...
3226 (linux_wait_for_event): ... here and merge it with former
3227 linux_wait_for_event - new variable wait_ptid, use it.
3228 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3230 2012-01-23 Pedro Alves <palves@redhat.com>
3232 * server.c (main): Avoid yet another case of infinite loop while
3233 detaching/killing after a longjmp.
3235 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3238 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3240 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3242 * hostio.c (handle_readlink): New function.
3243 (handle_vFile): Call it to handle "vFile:readlink" packets.
3245 2012-01-20 Pedro Alves <palves@redhat.com>
3246 Ulrich Weigand <ulrich.weigand@linaro.org>
3248 * server.c (handle_v_requests): Only support vAttach and vRun to
3249 start multiple processes when in extended protocol mode.
3251 2012-01-17 Pedro Alves <palves@redhat.com>
3253 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3254 memalign plus mprotect to allocate the scratch buffer.
3256 2012-01-13 Pedro Alves <palves@redhat.com>
3258 * server.c (attach_inferior): Clear `cont_thread'.
3260 2012-01-13 Pedro Alves <palves@redhat.com>
3262 * server.c (main): Avoid infinite loop while detaching/killing
3265 2012-01-09 Doug Evans <dje@google.com>
3267 * server.c (start_inferior): Set last_ptid in --wrapper case.
3269 2012-01-06 Yao Qi <yao@codesourcery.com>
3271 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3273 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3275 2012-01-04 Yao Qi <yao@codesourcery.com>
3277 * tracepoint.c (cmd_qtdp): Print debug message
3278 for static tracepoint.
3280 2012-01-04 Yao Qi <yao@codesourcery.com>
3282 * tracepoint.c (trace_vdebug): Differentiate debug message
3283 between gdbserver and IPA.
3285 2012-01-03 Yao Qi <yao@codesourcery.com>
3287 * tracepoint.c (tracepoint_was_hit): Don't collect for
3290 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3292 * terminal.h: Reformat copyright header.
3294 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3296 * server.c (gdbserver_version): Update copyright year.
3297 * gdbreplay.c (gdbreplay_version): Likewise.
3299 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3301 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3304 2011-12-18 Hui Zhu <teawater@gmail.com>
3305 * linux-low.c (linux_create_inferior): Save return value to ret.
3307 2011-12-18 Hui Zhu <teawater@gmail.com>
3309 * linux-low.c (linux_create_inferior): Save return value to ret.
3311 2011-12-16 Doug Evans <dje@google.com>
3313 * linux-low.c (linux_create_inferior): If stdio connection,
3314 redirect stdin from /dev/null, stdout to stderr.
3315 * remote-utils.c (remote_is_stdio): New static global.
3316 (remote_connection_is_stdio): New function.
3317 (remote_prepare): Handle stdio connection.
3318 (remote_open): Ditto.
3319 (remote_close): Don't close stdin for stdio connections.
3320 (read_prim,write_prim): New functions. Replace all calls to
3321 read/write to these.
3322 * server.c (main): Watch for "-" argument. Move call to
3323 remote_prepare before start_inferior.
3324 * server.h (STDIO_CONNECTION_NAME): New macro.
3325 (remote_connection_is_stdio): Declare.
3327 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3328 in debugging output.
3330 2011-12-15 Yao Qi <yao@codesourcery.com>
3332 * tracepoint.c: Include sys/syscall.h.
3333 (gdb_ust_thread): Remove preprocessor conditional.
3335 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3337 * linux-low.c (linux_detach_one_lwp): Call
3338 the_low_target.prepare_to_resume before detaching.
3340 2011-12-14 Yao Qi <yao@codesourcery.com>
3342 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3345 2011-12-14 Yao Qi <yao@codesourcery.com>
3347 * i386-low.c (i386_low_stopped_data_address): Initialize local
3350 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3354 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3355 DR_CONTROL unless necessary. Extend comments.
3356 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3357 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3359 2011-12-13 Yao Qi <yao@codesourcery.com>
3361 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3363 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3365 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3367 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3368 Print new debug message for such case.
3370 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3372 Fix overlapping memcpy.
3373 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3374 the read_inferior_memory transfer.
3375 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3376 write_inferior_memory transfer.
3377 (set_fast_tracepoint_jump): New variable buf. Use it for the
3378 read_inferior_memory and write_inferior_memory transfers.
3379 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3380 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3381 Use it for the write_inferior_memory transfer.
3382 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3385 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3387 * linux-low.c (fetch_register, store_register): Make code
3388 consistent, fix formatting.
3390 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3392 * linux-low.c (usr_store_inferior_registers): Factor out code
3393 to handle individual registers into...
3394 (store_register): ... this new function.
3396 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3398 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3399 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3400 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3401 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3402 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3403 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3404 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3405 (srv_xmlfiles): Add new XML files.
3407 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3409 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3410 (init_registers_s390_linux32v1): Add prototype.
3411 (init_registers_s390_linux32v2): Likewise.
3412 (init_registers_s390_linux64v1): Likewise.
3413 (init_registers_s390_linux64v2): Likewise.
3414 (init_registers_s390x_linux64v1): Likewise.
3415 (init_registers_s390x_linux64v2): Likewise.
3416 (s390_num_regs): Increment to 52.
3417 (s390_regmap): Add orig_r2 register.
3418 (s390_num_regs_3264): Increment to 68.
3419 (s390_regmap_3264): Add orig_r2 register.
3420 (s390_collect_ptrace_register): Handle orig_r2 register.
3421 (s390_supply_ptrace_register): Likewise.
3422 (s390_fill_last_break): New function.
3423 (s390_store_last_break): Likewise.
3424 (s390_fill_system_call): New function.
3425 (s390_store_system_call): Likewise.
3426 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3428 (s390_check_regset): New function.
3429 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3430 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3431 Update target_regsets for available register sets.
3433 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3434 Jan Kratochvil <jan.kratochvil@redhat.com>
3436 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3437 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3439 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3440 * linux-low.h (struct process_info_private): New member r_debug.
3441 * server.c (handle_qxfer_libraries): Call
3442 the_target->qxfer_libraries_svr4.
3443 (handle_qxfer_libraries_svr4): New function.
3444 (qxfer_packets): New entry "libraries-svr4".
3445 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3446 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3447 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3448 PACKET_qXfer_libraries_svr4.
3450 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3452 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3453 PSW address/mask between 8-byte and 16-byte formats.
3454 (s390_supply_ptrace_register): Likewise.
3455 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3456 basic addressing mode bit.
3458 2011-11-24 Stan Shebs <stan@codesourcery.com>
3460 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3462 2011-11-17 Stan Shebs <stan@codesourcery.com>
3464 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3465 (tracing_start_time): New global.
3466 (tracing_stop_time): New global.
3467 (tracing_user_name): New global.
3468 (tracing_notes): New global.
3469 (tracing_stop_note): New global.
3470 (cmd_qtstart): Set traceframe_usage, start_time.
3471 (stop_tracing): Set stop_time.
3472 (cmd_qtstatus): Report additional status.
3473 (cmd_qtp): New function.
3474 (handle_tracepoint_query): Call it.
3475 (cmd_qtnotes): New function.
3476 (handle_tracepoint_general_set): Call it.
3477 (get_timestamp): Rename from tsv_get_timestamp.
3479 2011-11-14 Stan Shebs <stan@codesourcery.com>
3480 Kwok Cheung Yeung <kcy@codesourcery.com>
3482 * linux-x86-low.c (small_jump_insn): New.
3483 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3484 trampoline and error message, build a trampoline and issue a small
3485 jump instruction to it.
3486 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3487 trampoline and error message.
3488 (x86_get_min_fast_tracepoint_insn_len): New.
3489 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3490 * linux-low.h (struct linux_target_ops): Add arguments to
3491 install_fast_tracepoint_jump_pad operation, add new operation.
3492 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3494 (linux_get_min_fast_tracepoint_insn_len): New function.
3495 (linux_target_op): Add new operation.
3496 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3497 (gdb_trampoline_buffer_end): Ditto.
3498 (gdb_trampoline_buffer_error): Ditto.
3499 (struct ipa_sym_addresses): Add fields for new IPA variables.
3500 (symbol_list): Add entries for new IPA variables.
3501 (struct tracepoint): Add fields to hold the address range of the
3502 trampoline used by the tracepoint.
3503 (trampoline_buffer_head): New static variable.
3504 (trampoline_buffer_tail): Ditto.
3505 (claim_trampoline_space): New function.
3506 (have_fast_tracepoint_trampoline_buffer): New function.
3507 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3509 (install_fast_tracepoint): Ditto, also add error buffer argument.
3510 (cmd_qtminftpilen): New function.
3511 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3512 (fast_tracepoint_from_trampoline_address): New function.
3513 (fast_tracepoint_collecting): Handle trampoline as part of jump
3515 (set_trampoline_buffer_space): New function.
3516 (initialize_tracepoint): Initialize new IPA variables.
3517 * target.h (struct target_ops): Add arguments to
3518 install_fast_tracepoint_jump_pad operation, add new
3519 get_min_fast_tracepoint_insn_len operation.
3520 (target_get_min_fast_tracepoint_insn_len): New.
3521 (install_fast_tracepoint_jump_pad): Add arguments.
3522 * server.h (IPA_BUFSIZ): Define.
3523 * linux-i386-ipa.c: Include extra header files.
3524 (initialize_fast_tracepoint_trampoline_buffer): New function.
3525 (initialize_low_tracepoint): Call it.
3526 * server.h (set_trampoline_buffer_space): Declare.
3527 (claim_trampoline_space): Ditto.
3528 (have_fast_tracepoint_trampoline_buffer): Ditto.
3530 2011-11-14 Yao Qi <yao@codesourcery.com>
3532 * server.c (handle_query): Handle InstallInTrace for qSupported.
3533 * tracepoint.c (add_tracepoint): Sort list.
3534 (install_tracepoint, download_tracepoint): New.
3535 (cmd_qtdp): Call them to install and download tracepoints.
3536 (sort_tracepoints): Removed.
3537 (cmd_qtstart): Update.
3539 2011-11-14 Yao Qi <yao@codesourcery.com>
3541 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3542 * mem-break.h: Declare.
3543 * tracepoint.c (cmd_qtstart): Move some code to ...
3544 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3546 (download_tracepoints): Move some code to ...
3547 (download_tracepoint_1): ... here. New.
3549 2011-11-08 Yao Qi <yao@codesourcery.com>
3551 * remote-utils.c (relocate_instruction): A comment fix.
3553 2011-11-07 Joel Brobecker <brobecker@adacore.com>
3555 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3556 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3557 dr_status_mirror and dr_control_mirror from debug_reg_state.
3558 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3559 (i386_initial_stuff): Remove use of deleted globals.
3560 (i386_get_thread_context, i386_set_thread_context,
3561 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3562 from debug_reg_state.
3564 2011-11-05 Yao Qi <yao@codesourcery.com>
3566 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3567 address as TPOINT's.
3569 2011-11-02 Stan Shebs <stan@codesourcery.com>
3571 * tracepoint.c (agent_mem_read_string): New function.
3572 (eval_agent_expr): Call it for tracenz.
3573 * server.c (handle_query): Report support for tracenz.
3575 2011-11-02 Yao Qi <yao@codesourcery.com>
3577 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3579 2011-11-02 Yao Qi <yao@codesourcery.com>
3581 * target.h: Fix a typo in comment.
3583 2011-10-31 Pedro Alves <pedro@codesourcery.com>
3585 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3586 clobber the breakpoints' shadows with fast tracepoint jumps.
3587 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3588 * target.c (write_inferior_memory): Also pass MYADDR down to
3591 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3593 * configure.ac: Check support for personality routine.
3594 * configure: Regenerate.
3595 * config.in: Likewise.
3596 * linux-low.c: Include <sys/personality.h>.
3597 Define ADDR_NO_RANDOMIZE if necessary.
3598 (linux_create_inferior): Disable address space randomization when
3599 forking inferior, if requested.
3600 (linux_supports_disable_randomization): New function.
3601 (linux_target_ops): Install it.
3602 * server.h (disable_randomization): Declare.
3603 * server.c (disable_randomization): New global variable.
3604 (handle_general_set): Handle QDisableRandomization.
3605 (handle_query): Likewise for qSupported.
3606 (main): Support --disable-randomization and --no-disable-randomization
3607 command line arguments.
3608 * target.h (struct target_ops): Add supports_disable_randomization.
3609 (target_supports_disable_randomization): New macro.
3611 2011-09-29 Mike Frysinger <vapier@gentoo.org>
3613 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3615 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3616 [!PT_GETDSBT] (target_loadmap): New definition.
3617 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3618 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3619 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3620 and PT_GETDSBT to LINUX_LOADMAP.
3621 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3622 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3624 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3626 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3627 (arm_linux_hwbp_cap): New static variable.
3628 (arm_linux_get_hwbp_cap): Replace by ...
3629 (arm_linux_init_hwbp_cap): ... this new function.
3630 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3631 (arm_linux_get_hw_watchpoint_count): Likewise.
3632 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3633 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3634 (arm_prepare_to_resume): Use perror_with_name instead of error.
3636 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
3638 * linux-arm-low.c: Include <signal.h>.
3639 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3640 (struct arm_linux_hwbp_cap): New data type.
3641 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3642 (struct arm_linux_hw_breakpoint): New data type.
3643 (MAX_BPTS, MAX_WPTS): Define.
3644 (struct arch_process_info, struct arch_lwp_info): New data types.
3645 (arm_linux_get_hwbp_cap): New function.
3646 (arm_linux_get_hw_breakpoint_count): Likewise.
3647 (arm_linux_get_hw_watchpoint_count): Likewise.
3648 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3649 (arm_hwbp_control_initialize): Likewise.
3650 (arm_hwbp_control_is_enabled): Likewise.
3651 (arm_hwbp_control_is_initialized): Likewise.
3652 (arm_hwbp_control_disable): Likewise.
3653 (arm_linux_hw_breakpoint_equal): Likewise.
3654 (arm_linux_hw_point_initialize): Likewise.
3655 (struct update_registers_data): New data structure.
3656 (update_registers_callback: New function.
3657 (arm_insert_point): Likewise.
3658 (arm_remove_point): Likewise.
3659 (arm_stopped_by_watchpoint): Likewise.
3660 (arm_stopped_data_address): Likewise.
3661 (arm_new_process): Likewise.
3662 (arm_new_thread): Likewise.
3663 (arm_prepare_to_resume): Likewise.
3664 (the_low_target): Register arm_insert_point, arm_remove_point,
3665 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3666 arm_new_thread, and arm_prepare_to_resume.
3668 2011-09-15 Stan Shebs <stan@codesourcery.com>
3670 * server.h (struct emit_ops): Add compare-goto fields.
3671 * tracepoint.c (gdb_agent_op_sizes): New table.
3672 (emit_eq_goto): New function.
3673 (emit_ne_goto): New function.
3674 (emit_lt_goto): New function.
3675 (emit_le_goto): New function.
3676 (emit_gt_goto): New function.
3677 (emit_ge_goto): New function.
3678 (is_goto_target): New function.
3679 (compile_bytecodes): Recognize special cases of compare-goto
3680 combinations and call specialized emitters for them.
3681 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3682 (amd64_emit_ne_goto): New function.
3683 (amd64_emit_lt_goto): New function.
3684 (amd64_emit_le_goto): New function.
3685 (amd64_emit_gt_goto): New function.
3686 (amd64_emit_ge_goto): New function.
3687 (amd64_emit_ops): Add the new functions.
3688 (i386_emit_eq_goto): New function.
3689 (i386_emit_ne_goto): New function.
3690 (i386_emit_lt_goto): New function.
3691 (i386_emit_le_goto): New function.
3692 (i386_emit_gt_goto): New function.
3693 (i386_emit_ge_goto): New function.
3694 (i386_emit_ops): Add the new functions.
3696 2011-09-08 Stan Shebs <stan@codesourcery.com>
3698 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3699 (i386_emit_epilogue): Restore %ebx.
3701 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3703 * server.c (step_thread): Remove definition.
3704 (process_serial_event): Don't handle Hs.
3705 * server.h (step_thread): Remove declaration.
3706 * target.c (set_desired_inferior): Remove use of step_thread.
3708 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3710 * linux-low.c: Include linux-procfs.h.
3711 (linux_attach_lwp_1): Update comments.
3712 (linux_attach): Scan for existing threads when attaching to a
3713 process that is the tgid.
3714 * Makefile.in: Update dependencies.
3716 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3718 * configure.srv: Add linux-procfs.o dependencies.
3720 2011-08-14 Yao Qi <yao@codesourcery.com>
3722 * target.h (struct target_ops): Fix indent.
3723 * win32-low.c (win32_target_ops): Fix comment.
3725 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3726 Yao Qi <yao@codesourcery.com>
3728 * Makefile.in (clean): Remove tic6x-*.c files.
3729 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3730 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3731 (tic6x-c64xp-linux.c): Likewise.
3732 * configure.srv: Add support for tic6x-*-uclinux.
3733 * linux-tic6x-low.c: New.
3734 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3736 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3737 Yao Qi <yao@codesourcery.com>
3739 * target.h (struct target_ops): Add read_loadmap.
3740 * linux-low.c (struct target_loadseg): New type.
3741 (struct target_loadmap): New type.
3742 (linux_read_loadmap): New function.
3743 (linux_target_ops): Add linux_read_loadmap.
3744 * server.c (handle_query): Support qXfer:fdpic:read packet.
3745 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3748 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3750 * win32-low.c: Include <stdint.h>.
3752 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3754 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3755 to the inferior here.
3756 (i386_remove_aligned_watchpoint): Ditto.
3757 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3758 fit part of the watchpoint in the debug registers.
3759 (i386_update_inferior_debug_regs): New.
3760 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3761 registers, and only update the inferior on success.
3762 (i386_low_remove_watchpoint): Ditto.
3764 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3766 * linux-low.c (compare_ints, unique, list_threads, show_process,
3767 linux_core_of_thread): Delete.
3768 (linux_target_ops): Change linux_core_of_thread to
3769 linux_common_core_of_thread.
3770 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3771 * utils.c (malloc_failure): Change type of argument.
3772 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3773 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3774 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3775 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3776 (IPA_OBJS): Add common-utils-ipa.o.
3777 (ptid_h, linux_osdata_h): New macros.
3778 (server_h): Add common/common-utils.h, common/xml-utils.h,
3779 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3781 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3782 ptid.o, buffer.o): New rules.
3783 (linux-low.o): Add common/linux-osdata.h as a dependency.
3784 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3785 * configure.ac: Add AC_HEADER_DIRENT check.
3786 * config.in: Regenerate.
3787 * configure: Regenerate.
3788 * remote-utils.c (xml_escape_text): Delete.
3789 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3790 buffer_xml_printf): Move to common/buffer.c.
3791 * server.c (main): Remove call to initialize_inferiors.
3792 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3793 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3794 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3795 internal_error, gdb_assert, gdb_assert_fail): Delete.
3796 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3797 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3799 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3800 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3801 initialize_inferiors): Delete.
3803 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3805 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3808 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3810 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3812 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3814 2011-05-26 Yao Qi <yao@codesourcery.com>
3816 * Makefile.in (thread-db.o): Track dependence to
3817 common/gdb_thread_db.h.
3818 * thread-db.c: include gdb_thread_db.h from right place.
3820 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3822 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3823 __FILE__ and __LINE__ to internal_error.
3825 2011-05-13 Doug Evans <dje@google.com>
3827 * thread-db.c (try_thread_db_load_from_sdir): New function.
3828 (try_thread_db_load_from_dir): New function.
3829 (thread_db_load_search): Handle $sdir, ignore $pdir.
3830 Remove trying of system directories if search of
3831 libthread-db-search-path fails, that is now done via $sdir.
3833 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3835 * server.c (handle_query): Add EnableDisableTracepoints to the list
3836 of supported features.
3837 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3839 (cmd_qtenable_disable): New.
3840 (cmd_qtstart): Install tracepoints even if disabled.
3841 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3842 receiving a QTEnable or QTDisable packet.
3843 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3844 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3846 (gdb_probe): Skip data collection if static tracepoint is disabled.
3848 2011-05-10 Doug Evans <dje@google.com>
3850 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3852 2011-05-04 Doug Evans <dje@google.com>
3854 * linux-low.c (linux_join): Skip process lookup.
3855 * spu-low.c (spu_join): Ditto.
3856 * server.c (join_inferiors_callback): Delete.
3857 (process_serial_event): For 'D' packet (detach) call join_inferior
3860 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3862 * README: Don't mention xscale*-*-linux*.
3863 * configure.srv (xscale*-*-linux*): Don't handle target.
3865 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3867 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3869 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3870 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3871 (i386_emit_void_call_2): Likewise.
3873 2011-04-26 Yao Qi <yao@codesourcery.com>
3875 * linux-low.c: Move common macros to linux-ptrace.h.
3876 Include linux-ptrace.h.
3877 * Makefile.in (linux_ptrace_h): New.
3878 (linux-low.o): Depends on linux-ptrace.h.
3880 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3882 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3883 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3884 (remote_prepare): New function with most of the TCP code from ...
3885 (remote_open): ... here. Detect PORT here unconditionally. Move also
3886 setting transport_is_reliable.
3887 * server.c (run_once): New variable.
3888 (gdbserver_usage): Document it.
3889 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3890 the first run if RUN_ONCE.
3891 * server.h (run_once, remote_prepare): New declarations.
3893 2011-04-19 Tom Tromey <tromey@redhat.com>
3895 * win32-low.c (handle_load_dll): Remove duplicate "the".
3897 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3899 Remove support for old Cygwin 1.5 versions.
3900 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3901 function to avoid warning.
3902 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3905 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3907 * gdbserver/server.h (Macro _): Define it if not available.
3909 2011-03-14 Michael Snyder <msnyder@vmware.com>
3911 * hostio.c (handle_close): Remove unnecessary null test.
3913 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3915 * Makefile.in (maintainer-clean realclean distclean): Remove
3916 "make ... subdir_do" command.
3918 2011-03-10 Michael Snyder <msnyder@vmware.com>
3920 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3922 * server.c (handle_v_run): Free alloced buffer on early return.
3924 2011-03-09 Yao Qi <yao@codesourcery.com>
3927 2011-03-04 Yao Qi <yao@codesourcery.com>
3929 * Makefile.in: Remove GNU make feature --directory.
3931 2011-03-05 Yao Qi <yao@codesourcery.com>
3933 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3934 (subdir_do): New make target. Copied from gdb/Makefile.
3935 (maintainer-clean, realclean, distclean, clean): Call corresponding
3936 make targets in common/Makefile.
3938 2011-02-11 Yao Qi <yao@codesourcery.com>
3940 * configure.ac: Call AC_PROG_RANLIB.
3941 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3942 * configure: Regenerate.
3944 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3946 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3948 2011-03-06 Yao Qi <yao@codesourcery.com>
3950 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3952 2011-03-05 Yao Qi <yao@codesourcery.com>
3954 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3955 (subdir_do): New make target. Copied from gdb/Makefile.
3956 (maintainer-clean, realclean, distclean, clean): Call corresponding
3957 make targets in common/Makefile.
3959 2011-03-04 Yao Qi <yao@codesourcery.com>
3961 * Makefile.in: Remove GNU make feature --directory.
3963 2011-03-04 Michael Snyder <msnyder@vmware.com>
3965 * server.c (queue_stop_reply): Call xmalloc not malloc.
3967 2011-03-02 Michael Snyder <msnyder@vmware.com>
3969 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3971 2011-02-28 Michael Snyder <msnyder@vmware.com>
3973 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3974 (cmd_qtframe): Ditto.
3975 (cmd_qtbuffer): Ditto.
3976 (cmd_bigqtbuffer): Ditto.
3978 * utils.c (decimal2str): Initialize 'width' to nine, then
3981 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3983 * hostio.c (require_data): Free *data, not data.
3985 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3987 * hostio.c (require_data): Use free, not xfree.
3989 2011-02-27 Michael Snyder <msnyder@vmware.com>
3991 * server.c (handle_query): Discard unused value.
3993 * hostio.c (require_data): Free malloc memory before returning
3996 2011-02-26 Michael Snyder <msnyder@vmware.com>
3998 * linux-low.c (list_threads): Call closedir for dirent.
4000 2011-02-27 Michael Snyder <msnyder@vmware.com>
4002 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4003 a case statement falls through.
4005 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4007 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4010 2011-02-26 Michael Snyder <msnyder@vmware.com>
4012 * utils.c (decimal2str): Eliminate dead code and dead param.
4013 (pulongest): Drop dead param from call to decimal2str.
4016 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4018 Revert the following patch (not approved yet):
4019 2011-02-21 Hui Zhu <teawater@gmail.com>
4020 * tracepoint.c (tp_printf): New function.
4021 (eval_agent_expr): Handle gdb_agent_op_printf.
4023 2011-02-21 Hui Zhu <teawater@gmail.com>
4025 * tracepoint.c (tp_printf): New function.
4026 (eval_agent_expr): Handle gdb_agent_op_printf.
4028 2011-02-18 Tom Tromey <tromey@redhat.com>
4030 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4031 (tracepoint.o): Likewise.
4032 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4033 (gdb_agent_op_names): Likewise.
4035 2011-02-18 Tom Tromey <tromey@redhat.com>
4037 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4038 gdb_agent_op_rot>: New constants.
4039 (gdb_agent_op_names): Add pick and roll.
4040 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4043 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4045 * aclocal.m4: Regenerated with aclocal-1.11.1.
4047 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4049 * server.c (handle_qxfer_traceframe_info): New.
4050 (qxfer_packets): Register "traceframe-info".
4051 (handle_query): Report support for qXfer:traceframe-info:read+.
4052 * tracepoint.c (match_blocktype): New.
4053 (traceframe_find_block_type): Rename to ...
4054 (traceframe_walk_blocks): ... this. Add callback filter argument,
4056 (traceframe_find_block_type): New, reimplemented on top of
4057 traceframe_walk_blocks.
4058 (build_traceframe_info_xml): New.
4059 (traceframe_read_info): New.
4060 * server.h (traceframe_read_info): Declare.
4062 2011-02-11 Yao Qi <yao@codesourcery.com>
4064 * configure.ac: Call AC_PROG_RANLIB.
4065 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4066 * configure: Regenerate.
4068 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4070 * server.c (gdb_read_memory): Change return semantics to allow
4072 (handle_search_memory_1): Adjust.
4073 (process_serial_event) <'m' packet>: Handle partial transfers.
4074 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4076 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4078 * regcache.c (init_register_cache): Initialize
4079 regcache->register_status.
4080 (free_register_cache): Release regcache->register_status.
4081 (regcache_cpy): Copy register_status.
4082 (registers_to_string): Print 'x's for unavailable registers.
4083 (supply_register): Mark the register's status valid or
4084 unavailable, depending on whether a buffer was passed in or not.
4085 (supply_register_zeroed): New.
4086 (supply_regblock): Mark the registers' status valid or
4087 unavailable, depending on whether a buffer was passed in or not.
4088 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4089 (struct regcache): New `register_status' field.
4090 (supply_register_zeroed): Declare.
4091 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4092 supply_register_zeroed, rather than passing a NULL buffer to
4094 * tracepoint.c (fetch_traceframe_registers): Update comment.
4096 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4098 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4101 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4103 * server.h (decode_xfer_write): Change prototype.
4104 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4105 and don't extract the annex here.
4106 * server.c (decode_xfer_read): Remove `annex' parameter,
4107 and don't extract the annex here.
4109 (struct qxfer): New.
4110 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4111 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4112 (handle_qxfer_statictrace): New functions, abstracted out from
4113 handle_query, and made to use the struct qxfer interface.
4114 (handle_threads_qxfer_proper): Rename to ...
4115 (handle_qxfer_threads_proper): ... this.
4116 (handle_threads_qxfer): Rename to ...
4117 (handle_qxfer_threads): ... this. Adjust.
4118 (qxfer_packets): New array.
4119 (handle_qxfer): New function.
4120 (handle_query): Use handle_qxfer.
4122 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4124 * gdbreplay.c: Shorten lines of >= 80 columns.
4125 * linux-low.c: Ditto.
4126 * linux-ppc-low.c: Ditto.
4127 * linux-s390-low.c: Ditto.
4128 * linux-sparc-low.c: Ditto.
4129 * linux-x86-low.c: Ditto.
4130 * linux-xtensa-low.c: Ditto.
4131 * mem-break.c: Ditto.
4133 * regcache.h: Ditto.
4134 * remote-utils.c: Ditto.
4137 * thread-db.c: Ditto.
4138 * tracepoint.c: Ditto.
4140 * win32-low.h: Ditto.
4142 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4144 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4147 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4149 * server.c (gdbserver_version): Update copyright year in version
4151 * gdbreplay.c (gdbreplay_version): Ditto.
4153 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4155 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4156 * linux-bfin-low.c: New file.
4157 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4158 PT_DATA_ADDR for BFIN targets.
4159 * Makefile.in (SFILES): Add linux-bfin-low.c.
4160 (clean): Remove reg-bfin.c.
4161 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4162 * README: Mention supported Blackfin targets.
4164 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4166 * .gitignore: New file.
4168 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4170 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4172 2010-10-22 Jie Zhang <jie@codesourcery.com>
4174 * Makefile.in: Add FLAGS_TO_PASS variable.
4175 (install): Remove dependency of install-only and recursively
4176 invoke make for install-only.
4178 2010-10-04 Doug Evans <dje@google.com>
4180 * Makefile.in (uninstall): Use $(DESTDIR).
4182 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4186 * linux-x86-low.c (compat_siginfo_from_siginfo)
4187 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4188 si_code is < 0. Check for si_code == SI_TIMER before checking for
4191 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4193 * lynx-i386-low.c: New file.
4194 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4196 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4198 * lynx-low.c (ptrace_request_to_str): Remove handling for
4199 request values that have been removed in LynxOS 5.x.
4201 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4203 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4206 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4208 * configure.ac: Add --enable-inprocess-agent option.
4209 * configure: Rebuilt.
4211 2010-09-06 Yao Qi <yao@codesourcery.com>
4213 * linux-low.c (linux_kill): Remove unused variable.
4214 (linux_stabilize_threads): Likewise.
4215 * server.c (start_inferior): Likewise.
4216 (queue_stop_reply_callback): Likewise.
4217 * tracepoint.c (do_action_at_tracepoint): Likewise.
4219 2010-09-06 Yao Qi <yao@codesourcery.com>
4221 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4224 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4226 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4228 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4230 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4235 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4236 gdbserver/lynx-ppc-low.c: New files.
4237 * Makefile.in (lynx_low_h): New variable.
4238 (lynx-low.o, lynx-ppc-low.o): New rules.
4239 * configure.ac: On LynxOS, link with -lnetinet.
4240 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4241 * configure: regenerate.
4243 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4245 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4246 * configure.ac: Add check for vasprintf and vsnprintf.
4247 * configure, config.in: Regenerate.
4248 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4250 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4252 * gdbreplay.c: Move include of alloca.h up, next to include of
4254 * server.h: Add include of malloc.h.
4255 * mem-break.c: Remove include of malloc.h.
4256 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4258 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4260 * Makefile.in (memmem.o): Build with -Wno-error.
4262 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4264 * utils.c (xsnprintf): Make non-static.
4265 * server.h: Add xsnprintf declaration.
4266 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4267 replace calls to snprintf by calls to xsnprintf throughout.
4269 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4271 * configure.ac: Add configure check for alloca.
4272 * configure, config.in: Regenerate.
4273 * server.h: Include alloca.h if it exists.
4274 * gdbreplay.c: Include alloca.h if it exists.
4276 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4278 * linux-low.c (__SIGRTMIN): Define if not already defined.
4279 (linux_create_inferior): Check for __ANDROID__ rather than
4281 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4282 are already deferred.
4283 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4284 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4285 stopped and already has a pending signal to report.
4286 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4287 a pending signal to report or is moving out of a jump pad.
4288 (linux_init_signals): Check for __ANDROID__ rather than
4291 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4293 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4294 debug_threads check. Avoid a linear search when not doing debug
4297 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4299 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4300 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4301 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4302 (process_event): Change local fd's type to gdb_fildes_t.
4303 (create_file_handler): Adjust prototype.
4304 (delete_file_handler): Adjust prototype.
4305 (handle_file_event): Adjust prototype. Use pfildes.
4306 (create_file_event): Adjsut prototype.
4307 * remote-utils.c (remote_desc, listen_desc): Change type to
4309 * server.h: New gdb_fildes_t typedef.
4310 [USE_WIN32API]: Include winsock2.h.
4311 (delete_file_handler, add_file_handler): Adjust prototypes.
4313 * utils.c (pfildes): New.
4315 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4317 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4318 * configure: Regenerate.
4320 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4322 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4323 (linux_done_accessing_memory): ... this.
4324 (linux_target_ops): Adjust.
4325 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4326 * nto-low.c (nto_target_ops): Adjust comment.
4327 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4328 * spu-low.c (spu_target_ops): Adjust comment.
4329 * target.h (target_ops): Rename unprepare_to_access_memory field
4330 to done_accessing_memory.
4331 (unprepare_to_access_memory): Rename to ...
4332 (done_accessing_memory): ... this.
4334 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4336 * linux-low.c (linux_prepare_to_access_memory): New.
4337 (linux_unprepare_to_access_memory): New.
4338 (linux_target_ops): Install them.
4339 * server.c (read_memory): Rename to ...
4340 (gdb_read_memory): ... this. Use
4341 prepare_to_access_memory/prepare_to_access_memory.
4342 (write_memory): Rename to ...
4343 (gdb_write_memory): ... this. Use
4344 prepare_to_access_memory/prepare_to_access_memory.
4345 (handle_search_memory_1): Adjust.
4346 (process_serial_event): Adjust.
4347 * target.h (struct target_ops): New fields
4348 prepare_to_access_memory and unprepare_to_access_memory.
4349 (prepare_to_access_memory, unprepare_to_access_memory): New.
4350 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4351 prepare_to_access_memory/prepare_to_access_memory.
4352 * nto-low.c (nto_target_ops): Adjust.
4353 * spu-low.c (spu_target_ops): Adjust.
4354 * win32-low.c (win32_target_ops): Adjust.
4356 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4358 * Makefile.in (WARN_CFLAGS): Get it from configure.
4359 (WERROR_CFLAGS): New.
4360 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4361 * configure.ac: Introduce --enable-werror, which adds -Werror to
4362 the compiler command line. Enabled by default. Disable with
4363 --disable-werror. Add -Wdeclaration-after-statement
4364 Wpointer-arith and -Wformat-nonliteral to warning flags.
4365 * configure: Regenerate.
4367 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4369 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4371 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4373 * gdbreplay.c (remote_error): New.
4375 (expect): Use gdbchar. Check for error reading from GDB.
4376 Clarify sync error output.
4377 (play): Check for errors writing to GDB.
4378 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4379 * remote-utils.c (getpkt): Check for errors writing to the remote
4382 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4384 * linux-low.c (linux_wait_1): Move non-debugging code out of
4385 `debug_threads' control.
4387 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4389 * linux-low.c (linux_wait_1): Don't set last_status here.
4390 * server.c (push_event, queue_stop_reply_callback): Assert we're
4391 not pushing a TARGET_WAITKIND_IGNORE event.
4392 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4393 (myresume, handle_target_event): Set the thread's last_resume_kind
4394 and last_status from the target returned status.
4396 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4400 * linux-x86-low.c (update_debug_registers_callback): New.
4401 (i386_dr_low_set_addr): Use it.
4402 (i386_dr_low_get_addr): New.
4403 (i386_dr_low_set_control): Use update_debug_registers_callback.
4404 (i386_dr_low_get_control): New.
4405 (i386_dr_low_get_status): Adjust.
4406 * linux-low.c (linux_stop_lwp): New.
4407 * linux-low.h (linux_stop_lwp): Declare.
4409 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4410 argument instead of a i386_debug_reg_state.
4411 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4412 a i386_debug_reg_state.
4413 (i386_insert_aligned_watchpoint): Adjust.
4414 (i386_remove_aligned_watchpoint): Adjust.
4415 (i386_low_stopped_data_address): Read the debug registers from the
4416 inferior instead of from the mirrors.
4417 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4418 (i386_dr_low_get_addr): Declare.
4419 (i386_dr_low_get_control): Declare.
4420 (i386_dr_low_get_status): Change prototype.
4422 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4423 (i386_dr_low_get_addr): New.
4424 (i386_dr_low_get_control): New.
4425 (i386_dr_low_get_status): Adjust prototype. Return
4427 (i386_initial_stuff): Clear dr_status_mirror and
4429 (i386_get_thread_context): Adjust.
4430 (i386_set_thread_context): Adjust.
4431 (i386_thread_added): Adjust.
4433 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4435 * linux-low.h (linux_thread_area): Delete declaration.
4437 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4439 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4440 after its termination.
4442 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4444 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4445 (gdb_wants_all_stopped): Delete.
4446 (linux_wait_1): Don't call them.
4447 * server.c (handle_v_cont): Tag all threads as want-stopped.
4448 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4449 stopped as "client-wants-stopped".
4451 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4453 * Makefile.in (signals_h): New.
4454 (server_h): Depend on it.
4455 (server.o): Don't depend on $(signals_def).
4456 (signals.o): Depend on $(signals_def).
4458 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4460 * Makefile.in (signals_def): New.
4461 (server_h): Append include/gdb/signals.h and signals_def.
4462 (server.o): Append signals_def.
4464 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4466 * server.c (handle_target_event): Use target_signal_to_host for
4467 resume_info.sig initialization.
4468 * target.h (struct thread_resume) <sig>: New comment.
4470 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4472 * server.c (handle_query): strcpy() the returned string from paddress()
4473 instead of sprintf().
4474 * utils.c (paddress): Return phex_nz().
4476 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4478 * server.c (handle_v_cont): Call mourn_inferior if process
4480 (myresume): Likewise.
4482 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4484 Static tracepoints, and integration with UST.
4486 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4487 * mem-break.c (uninsert_all_breakpoints)
4488 (reinsert_all_breakpoints): New.
4489 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4490 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4491 (gdb_agent_ust_loaded, helper_thread_id)
4492 (gdb_agent_helper_thread_id): New macros.
4493 (struct ipa_sym_addresses): Add addr_ust_loaded,
4494 addr_helper_thread_id, addr_cmd_buf.
4495 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4496 (in_process_agent_loaded_ust): New.
4497 (write_e_ust_not_loaded): New.
4498 (maybe_write_ipa_ust_not_loaded): New.
4499 (struct collect_static_trace_data_action): New.
4500 (enum tracepoint_type) <static_tracepoint>: New.
4501 (struct tracepoint) <handle>: Mention static tracepoints.
4502 (struct static_tracepoint_ctx): New.
4503 (CMD_BUF_SIZE): New.
4504 (add_tracepoint_action): Handle static tracepoint actions.
4505 (unprobe_marker_at): New.
4506 (clear_installed_tracepoints): Handle static tracepoints.
4507 (cmd_qtdp): Handle static tracepoints.
4508 (probe_marker_at): New.
4509 (cmd_qtstart): Handle static tracepoints.
4510 (response_tracepoint): Handle static tracepoints.
4511 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4512 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4513 (get_context_regcache): Handle static tracepoints.
4514 (do_action_at_tracepoint): Handle static tracepoint actions.
4515 (traceframe_find_block_type): Handle static trace data blocks.
4516 (traceframe_read_sdata): New.
4517 (download_tracepoints): Download static tracepoint actions.
4518 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4519 (GDB_PROBE_NAME): New.
4524 (ust_marker_to_static_tracepoint): New.
4526 (collect_ust_data_at_tracepoint): New.
4527 (gdb_ust_probe): New.
4528 (UNIX_PATH_MAX, SOCK_DIR): New.
4529 (gdb_ust_connect_sync_socket): New.
4530 (resume_thread, stop_thread): New.
4531 (run_inferior_command): New.
4532 (init_named_socket): New.
4533 (gdb_ust_socket_init): New.
4534 (cstr_to_hexstr): New.
4536 (first_marker, next_marker): New.
4537 (response_ust_marker): New.
4538 (cmd_qtfstm, cmd_qtsstm): New.
4539 (unprobe_marker_at, probe_marker_at): New.
4540 (cmd_qtstmat, gdb_ust_thread): New.
4541 (gdb_ust_init): New.
4542 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4543 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4545 (x86_64_st_collect_regmap): New.
4546 (X86_64_NUM_ST_COLLECT_GREGS): New.
4547 (AMD64_RIP_REGNUM): New.
4548 (supply_static_tracepoint_registers): New.
4549 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4551 (i386_st_collect_regmap): New.
4552 (i386_NUM_ST_COLLECT_GREGS): New.
4553 (supply_static_tracepoint_registers): New.
4554 * server.c (handle_query): Handle qXfer:statictrace:read.
4555 <qSupported>: Report support for StaticTracepoints, and
4556 qXfer:statictrace:read features.
4557 * server.h (traceframe_read_sdata)
4558 (supply_static_tracepoint_registers): Declare.
4559 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4560 (unpack_varlen_hex): Include in IPA build.
4561 * Makefile.in (ustlibs, ustinc): New.
4562 (IPA_OBJS): Add remote-utils-ipa.o.
4563 ($(IPA_LIB)): Link -ldl and -lpthread.
4565 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4566 * config.in, configure: Regenerate.
4568 2010-06-20 Ian Lance Taylor <iant@google.com>
4569 Pedro Alves <pedro@codesourcery.com>
4571 * linux-x86-low.c (always_true): Delete.
4572 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4573 trying to fool the compiler with always_true.
4575 2010-06-20 Pedro Alves <pedro@codesourcery.com>
4577 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4578 conditions in gdbserver.
4580 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4582 * spu-low.c (spu_read_memory): Wrap around local store limit.
4583 (spu_write_memory): Likewise.
4585 2010-06-15 Pedro Alves <pedro@codesourcery.com>
4587 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4588 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4590 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4592 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4593 uses with LONGEST uses.
4595 2010-06-14 Stan Shebs <stan@codesourcery.com>
4596 Pedro Alves <pedro@codesourcery.com>
4600 * linux-x86-low.c: Include limits.h.
4605 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4606 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4607 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4608 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4609 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4610 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4611 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4612 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4613 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4614 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4615 (amd64_emit_void_call_2): New.
4616 (amd64_emit_ops): New.
4617 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4618 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4619 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4620 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4621 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4622 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4623 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4624 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4625 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4626 (i386_emit_stack_adjust, i386_emit_int_call_1)
4627 (i386_emit_void_call_2): New.
4628 (i386_emit_ops): New.
4629 (x86_emit_ops): New.
4630 (the_low_target): Install x86_emit_ops.
4631 * server.h (struct emit_ops): New.
4632 (get_raw_reg_func_addr): Declare.
4633 (current_insn_ptr, emit_error): Declare.
4634 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4635 (set_trace_state_variable_value): New defines.
4636 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4637 addr_get_trace_state_variable_value and
4638 addr_set_trace_state_variable_value.
4639 (symbol_list): New fields for get_raw_reg,
4640 get_trace_state_variable_value and set_trace_state_variable_value.
4641 (condfn): New typedef.
4642 (struct tracepoint): New field `compiled_cond'.
4643 (do_action_at_tracepoint): Clear compiled_cond.
4644 (get_trace_state_variable_value, set_trace_state_variable_value):
4646 (condition_true_at_tracepoint): If there's a compiled condition,
4648 (current_insn_ptr, emit_error): New globals.
4649 (struct bytecode_address): New.
4650 (get_raw_reg_func_addr): New.
4651 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4652 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4653 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4654 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4655 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4656 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4657 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4658 (compile_tracepoint_condition, compile_bytecodes): New.
4659 * target.h (emit_ops): Forward declare.
4660 (struct target_ops): New field emit_ops.
4661 (target_emit_ops): New.
4662 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4664 * linux-low.c (linux_emit_ops): New.
4665 (linux_target_ops): Install it.
4666 * linux-low.h (struct linux_target_ops): New field emit_ops.
4668 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4670 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4671 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4673 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4674 Stan Shebs <stan@codesourcery.com>
4676 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4677 (all): Depend on $(extra_libraries).
4678 (install-only): Install the IPA.
4679 (IPA_OBJS, IPA_LIB): New.
4680 (clean): Remove the IPA lib.
4681 (IPAGENT_CFLAGS): New.
4682 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4683 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4684 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4685 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4686 * configure.ac: Check for atomic builtins support in the compiler.
4687 (IPA_DEPFILES, extra_libraries): Define.
4688 * configure.srv (ipa_obj): Add description.
4689 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4690 (i[34567]86-*-linux*): Set ipa_obj.
4691 (x86_64-*-linux*): Set ipa_obj.
4692 * linux-low.c (stabilizing_threads): New.
4693 (supports_fast_tracepoints): New.
4694 (linux_detach): Stabilize threads before detaching.
4695 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4696 the lwp is either not stabilizing, or is moving out of a jump pad.
4697 (linux_fast_tracepoint_collecting): New.
4698 (maybe_move_out_of_jump_pad): New.
4699 (enqueue_one_deferred_signal): New.
4700 (dequeue_one_deferred_signal): New.
4701 (linux_wait_for_event_1): If moving out of a jump pad, defer
4702 pending signals to later.
4703 (linux_stabilize_threads): New.
4704 (linux_wait_1): Check if threads need moving out of jump pads, and
4706 (stuck_in_jump_pad_callback): New.
4707 (move_out_of_jump_pad_callback): New.
4709 (linux_resume_one_lwp): Handle moving out of jump pads.
4710 (linux_set_resume_request): Dequeue deferred signals.
4711 (need_step_over_p): Also step over fast tracepoint jumps.
4712 (start_step_over): Also uninsert fast tracepoint jumps.
4713 (finish_step_over): Also reinsert fast tracepoint jumps.
4714 (linux_install_fast_tracepoint_jump): New.
4715 (linux_target_ops): Install linux_stabilize_threads and
4716 linux_install_fast_tracepoint_jump_pad.
4717 * linux-low.h (linux_target_ops) <get_thread_area,
4718 install_fast_tracepoint_jump_pad>: New fields.
4719 (struct lwp_info) <collecting_fast_tracepoint,
4720 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4721 (linux_get_thread_area): Declare.
4722 * linux-x86-low.c (jump_insn): New.
4723 (x86_get_thread_area): New.
4724 (append_insns): New.
4726 (amd64_install_fast_tracepoint_jump_pad): New.
4727 (i386_install_fast_tracepoint_jump_pad): New.
4728 (x86_install_fast_tracepoint_jump_pad): New.
4729 (the_low_target): Install x86_get_thread_area and
4730 x86_install_fast_tracepoint_jump_pad.
4731 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4732 (struct fast_tracepoint_jump): New.
4733 (fast_tracepoint_jump_insn): New.
4734 (fast_tracepoint_jump_shadow): New.
4735 (find_fast_tracepoint_jump_at): New.
4736 (fast_tracepoint_jump_here): New.
4737 (delete_fast_tracepoint_jump): New.
4738 (set_fast_tracepoint_jump): New.
4739 (uninsert_fast_tracepoint_jumps_at): New.
4740 (reinsert_fast_tracepoint_jumps_at): New.
4741 (set_breakpoint_at): Use write_inferior_memory.
4742 (uninsert_raw_breakpoint): Use write_inferior_memory.
4743 (check_mem_read): Mask out fast tracepoint jumps.
4744 (check_mem_write): Mask out fast tracepoint jumps.
4745 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4746 (set_fast_tracepoint_jump): Declare.
4747 (delete_fast_tracepoint_jump)
4748 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4749 (reinsert_fast_tracepoint_jumps_at): Declare.
4750 * regcache.c: Don't compile many functions when building the
4751 in-process agent library.
4752 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4753 the register buffer in the heap.
4754 (free_register_cache): If the register buffer isn't owned by the
4755 regcache, don't free it.
4756 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4757 pre-existing register caches.
4758 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4760 (convert_ascii_to_int): : Constify `from' parameter type.
4761 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4762 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4763 the needed buffer in-place.
4764 (relocate_instruction): New.
4765 * server.c (handle_query) <qSymbols>: If the target supports
4766 tracepoints, give it a chance of looking up symbols. Report
4767 support for fast tracepoints.
4768 (handle_status): Stabilize threads.
4769 (process_serial_event): Adjust.
4770 * server.h (struct fast_tracepoint_jump): Forward declare.
4771 (struct process_info) <fast_tracepoint_jumps>: New field.
4772 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4773 (decode_X_packet, decode_M_packet): Adjust.
4774 (relocate_instruction): Declare.
4775 (in_process_agent_loaded): Declare.
4776 (tracepoint_look_up_symbols): Declare.
4777 (struct fast_tpoint_collect_status): Declare.
4778 (fast_tracepoint_collecting): Declare.
4779 (force_unlock_trace_buffer): Declare.
4780 (handle_tracepoint_bkpts): Declare.
4781 (initialize_low_tracepoint)
4782 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4783 * target.h (struct target_ops) <stabilize_threads,
4784 install_fast_tracepoint_jump_pad>: New fields.
4785 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4786 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4787 [HAVE_STDINT_H]: Include stdint.h.
4788 (trace_debug_1): Rename to ...
4789 (trace_vdebug): ... this.
4790 (trace_debug): Rename to ...
4791 (trace_debug_1): ... this. Add `level' parameter.
4793 (ATTR_USED, ATTR_NOINLINE): New.
4794 (IP_AGENT_EXPORT): New.
4795 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4796 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4797 (about_to_request_buffer_space, trace_buffer_is_full)
4798 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4799 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4800 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4801 (traceframe_write_count, traceframes_created)
4802 (trace_state_variables)
4803 New renaming defines.
4804 (struct ipa_sym_addresses): New.
4805 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4807 (ipa_sym_addrs): New.
4808 (all_tracepoint_symbols_looked_up): New.
4809 (in_process_agent_loaded): New.
4810 (write_e_ipa_not_loaded): New.
4811 (maybe_write_ipa_not_loaded): New.
4812 (tracepoint_look_up_symbols): New.
4813 (debug_threads) [IN_PROCESS_AGENT]: New.
4814 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4815 (UNKNOWN_SIDE_EFFECTS): New.
4816 (stop_tracing): New.
4817 (flush_trace_buffer): New.
4818 (stop_tracing_bkpt): New.
4819 (flush_trace_buffer_bkpt): New.
4820 (read_inferior_integer): New.
4821 (read_inferior_uinteger): New.
4822 (read_inferior_data_pointer): New.
4823 (write_inferior_data_pointer): New.
4824 (write_inferior_integer): New.
4825 (write_inferior_uinteger): New.
4826 (struct collect_static_trace_data_action): Delete.
4827 (enum tracepoint_type): New.
4828 (struct tracepoint) <type>: New field `type'.
4829 <actions_str, step_actions, step_actions_str>: Only include in
4831 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4832 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4833 (tracepoints): Use IP_AGENT_EXPORT.
4834 (last_tracepoint): Don't include in the IPA.
4835 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4836 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4837 (alloced_trace_state_variables): New.
4838 (trace_state_variables): Use IP_AGENT_EXPORT.
4839 (traceframe_t): Delete unused variable.
4840 (circular_trace_buffer): Don't include in the IPA.
4841 (trace_buffer_start): Delete.
4842 (struct trace_buffer_control): New.
4843 (trace_buffer_free): Delete.
4844 (struct ipa_trace_buffer_control): New.
4845 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4846 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4848 (trace_buffer_ctrl): New.
4849 (TRACE_BUFFER_CTRL_CURR): New.
4850 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4851 Reimplement as macros.
4852 (trace_buffer_wrap): Delete.
4853 (traceframe_write_count, traceframe_read_count)
4854 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4855 (struct tracepoint_hit_ctx) <type>: New field.
4856 (struct fast_tracepoint_ctx): New.
4857 (memory_barrier): New.
4859 (record_tracepoint_error): Update atomically in the IPA.
4860 (clear_inferior_trace_buffer): New.
4861 (about_to_request_buffer_space): New.
4862 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4863 updating the same buffer.
4864 (add_tracepoint): Default the tracepoint's type to trap
4865 tracepoint, and orig_size to -1.
4866 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4868 (create_trace_state_variable): New parameter `gdb'. Handle it.
4869 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4870 (cmd_qtdp): Handle fast tracepoints.
4872 (max_jump_pad_size): New.
4873 (gdb_jump_pad_head): New.
4874 (get_jump_space_head): New.
4875 (claim_jump_space): New.
4876 (sort_tracepoints): New.
4877 (MAX_JUMP_SIZE): New.
4878 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4880 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4881 support. Upload fast traceframes, and delete internal IPA
4883 (stop_tracing_handler): New.
4884 (flush_trace_buffer_handler): New.
4885 (cmd_qtstop): Upload fast tracepoints.
4886 (response_tracepoint): Handle fast tracepoints.
4887 (tracepoint_finished_step): Upload fast traceframes. Set the
4888 tracepoint hit context's tracepoint type.
4889 (handle_tracepoint_bkpts): New.
4890 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4891 type. Add comment about fast tracepoints.
4892 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4893 non-existing action_str field.
4894 (get_context_regcache): Handle fast tracepoints.
4895 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4897 (fast_tracepoint_from_jump_pad_address): New.
4898 (fast_tracepoint_from_ipa_tpoint_address): New.
4899 (collecting_t): New.
4900 (force_unlock_trace_buffer): New.
4901 (fast_tracepoint_collecting): New.
4904 (write_inferior_data_ptr): New.
4905 (target_tp_heap): New.
4906 (target_malloc): New.
4907 (download_agent_expr): New.
4909 (download_tracepoints): New.
4910 (download_trace_state_variables): New.
4911 (upload_fast_traceframes): New.
4912 (IPA_FIRST_TRACEFRAME): New.
4913 (IPA_NEXT_TRACEFRAME_1): New.
4914 (IPA_NEXT_TRACEFRAME): New.
4915 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4916 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4917 (gdb_jump_pad_buffer_end): New.
4918 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4919 (initialize_tracepoint): Adjust.
4920 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4921 buffer. Initialize the low module.
4922 * utils.c (PREFIX, TOOLNAME): New.
4923 (malloc_failure): Use PREFIX.
4924 (error): In the IPA, an error causes an exit.
4925 (fatal, warning): Use PREFIX.
4926 (internal_error): Use TOOLNAME.
4927 (NUMCELLS): Increase to 10.
4928 * configure, config.in: Regenerate.
4930 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4932 * server.c (handle_query) <qSupported>: Do two passes over the
4933 qSupported string to avoid nesting strtok.
4935 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4937 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4939 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4941 * configure: Regenerate.
4942 * proc-service.list: New.
4944 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4946 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4949 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4951 * gdbreplay.c (remote_open): Check error return from socket() call by
4952 its equality to -1 not by it being negative.
4953 * remote-utils.c (remote_open): Likewise.
4955 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4957 * config.h: Regenerate.
4959 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4961 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4962 doesn't provide PTRACE_GET_THREAD_AREA.
4964 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4966 * linux-m68k-low.c: Include <asm/ptrace.h>
4967 (ps_get_thread_area): Implement.
4969 2010-05-03 Doug Evans <dje@google.com>
4971 * event-loop.c (struct callback_event): New struct.
4972 (callback_list): New global.
4973 (append_callback_event, delete_callback_event): New functions.
4974 (process_callback): New function.
4975 (start_event_loop): Call it.
4976 * remote-utils.c (NOT_SCHEDULED): Define.
4977 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4978 moved out of readchar.
4979 (readchar): Rewrite. Call reschedule before returning.
4980 (reset_readchar): New function.
4981 (remote_close): Call it.
4982 (process_remaining, reschedule): New functions.
4983 * server.h (callback_handler_func): New typedef.
4984 (append_callback_event, delete_callback_event): Declare.
4986 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4988 * proc-service.c (ps_pglobal_lookup): Use
4989 thread_db_look_up_one_symbol.
4990 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4991 parameter. Use it instead of all_symbols_looked_up.
4992 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4994 (all_symbols_looked_up): Don't declare.
4995 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4996 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4998 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4999 Set all_symbols_looked_up here.
5000 (thread_db_look_up_one_symbol): New.
5001 (thread_db_get_tls_address): Adjust.
5002 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5003 thread_db object on the heap, and tentatively set it in the
5005 (thread_db_init): Don't set all_symbols_looked_up here.
5006 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5008 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5010 * linux-low.c (linux_kill, linux_detach): Adjust.
5011 (status_pending_p_callback): Remove redundant statement. Check
5012 for !TARGET_WAITIKIND_IGNORE, instead of
5013 TARGET_WAITKIND_STOPPED.
5014 (handle_tracepoints): Make sure LWP is locked. Adjust.
5015 (linux_wait_for_event_1): Adjust.
5016 (linux_cancel_breakpoints): New.
5017 (unsuspend_one_lwp): New.
5018 (unsuspend_all_lwps): New.
5019 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5020 (send_sigstop_callback): Change return type to int, add new
5021 `except' parameter and handle it.
5022 (suspend_and_send_sigstop_callback): New.
5023 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5024 pass them down. If SUSPEND, also increment the lwp's suspend
5026 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5027 (need_step_over_p): Don't consider suspended LWPs.
5028 (start_step_over): Adjust.
5029 (proceed_one_lwp): Change return type to int, add new `except'
5030 parameter and handle it.
5031 (unsuspend_and_proceed_one_lwp): New.
5032 (proceed_all_lwps): Use find_inferior instead of
5034 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5035 also decrement the suspend count of LWPs. Pass `except' down,
5036 instead of hacking its suspend count.
5037 (linux_pause_all): Add `freeze' parameter. Adjust.
5038 (linux_unpause_all): New.
5039 (linux_target_ops): Install linux_unpause_all.
5040 * server.c (handle_status): Adjust.
5041 * target.h (struct target_ops): New fields `unpause_all' and
5042 `cancel_breakpoints'. Add new parameter to `pause_all'.
5043 (pause_all): Add new `freeze' parameter.
5045 (cancel_breakpoints): New.
5046 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5048 (cmd_qtstart): Pause threads.
5049 (stop_tracing): Pause threads, and cancel breakpoints.
5050 * win32-low.c (win32_target_ops): Adjust.
5052 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5054 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5055 the inferior right away from here...
5056 (linux_wait_1): ... to here, and adjust to check the thread's
5057 last_resume_kind instead of the lwp's step or stop_expected flags.
5059 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5061 * README: Use consistent `GDB' and `GDBserver' spellings.
5063 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5065 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5066 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5067 (linux_detach_one_lwp): Assume the lwp is stopped.
5068 (any_thread_of): Delete.
5069 (linux_detach): Stop all lwps here. Don't blindly delete all
5071 (delete_lwp_callback): New.
5072 (linux_mourn): Delete all lwps of the process that is gone.
5073 (linux_wait_1): Don't delete the last lwp of the process here.
5074 * mem-break.h (mark_breakpoints_out): Declare.
5075 * mem-break.c (mark_breakpoints_out): New.
5076 (free_all_breakpoints): Use it.
5077 * server.c (handle_target_event): If the process is gone, mark
5079 * thread-db.c (struct thread_db) <create_bp>: New field.
5080 (thread_db_enable_reporting): Fix prototype. Store a thread event
5081 breakpoint reference in the thread_db struct.
5082 (thread_db_load_search): Clear the thread_db object.
5083 (try_thread_db_load_1): Ditto.
5084 (switch_to_process): New.
5085 (disable_thread_event_reporting): Use it.
5086 (remove_thread_event_breakpoints): New.
5087 (thread_db_detach, thread_db_mourn): Use it.
5089 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5091 * linux-low.c (linux_enable_event_reporting): New.
5092 (linux_wait_for_event_1, handle_extended_wait): Use it.
5094 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5096 * linux-low.c (linux_kill_one_lwp, linux_kill)
5097 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5098 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5099 SIGSTOP even if the LWP is stopped.
5100 (send_sigstop_callback): New.
5101 (stop_all_lwps): Use send_sigstop_callback instead.
5102 (linux_resume_one_thread): Adjust.
5103 (proceed_one_lwp): Still proceed an LWP that the client has
5104 requested to stop, if we haven't reported it as stopped yet. Make
5105 sure that LWPs the client want stopped, have a pending SIGSTOP.
5107 2010-04-26 Doug Evans <dje@google.com>
5109 * server.c (handle_general_set): Make static.
5111 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5112 Print received char after testing for error/eof instead of before.
5113 (input_interrupt): Tweak comment.
5115 2010-04-23 Doug Evans <dje@google.com>
5117 * server.c (start_inferior): Print inferior argv if --debug.
5119 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5121 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5122 * nto-x86-low.c: Include server.h
5124 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5126 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5127 be consistent with other sources of this directory.
5128 (init_registers_amd64): Correct name of source file of this function
5131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5133 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5136 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5138 * win32-i386-low.c: Add 64-bit support.
5139 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5140 (init_registers_amd64): Declare.
5141 (mappings): Add 64-bit version of array.
5142 (init_windows_x86): New function.
5143 (the_low_target): Change init_arch field to init_windows_x86.
5145 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5147 * win32-low.c: Adapt to support also 64-bit architecture.
5148 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5149 (get_image_name): Use SIZE_T type for local variable `done'.
5150 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5151 (toolhelp_get_dll_name): Idem.
5152 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5153 Use uintptr_t typecast to avoid warning.
5154 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5155 (handle_exception): Use phex_nz to avoid warning.
5156 (win32_wait): Remove unused local variable `process'.
5158 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5160 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5163 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5165 * configure.ac: Use `ws2_32' library for srv_mingw.
5166 * configure: Regenerate.
5167 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5168 * remote-utils.c: Likewise.
5170 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5172 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5173 if __x86_64__ is defined.
5175 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5177 * configure: Regenerate.
5179 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5181 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5182 * target.h (target_ops): New get_tib_address field.
5183 * win32-low.h (win32_thread_info): Add thread_local_base field.
5184 * win32-low.c (child_add_thread): Add tlb argument.
5185 Set thread_local_base field to TLB.
5186 (get_child_debug_event): Adapt to child_add_thread change.
5187 (win32_get_tib_address): New function.
5188 (win32_target_ops): Set get_tib_address field to
5189 win32_get_tib_address.
5190 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5192 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5194 * linux-low.c (linux_mourn): Also remove the process.
5195 * server.c (handle_target_event): Don't remove the process here.
5196 * nto-low.c (nto_mourn): New.
5197 (nto_target_ops): Install it.
5198 * spu-low.c (spu_mourn): New.
5199 (spu_target_ops): Install it.
5200 * win32-low.c (win32_mourn): New.
5201 (win32_target_ops): Install it.
5203 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5205 * server.h (buffer_xml_printf): Remove redundant `;'.
5207 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5209 * regcache.c (set_register_cache): Invalidate regcaches before
5210 changing the register cache layout.
5211 (regcache_invalidate_one): Allow a NULL regcache.
5212 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5213 regcaches before changing the register cache layout or the target
5216 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5218 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5219 variable warning on Linux/x86-64.
5221 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5223 GDBserver disconnected tracing support.
5225 * linux-low.c (linux_remove_process): Delete.
5226 (add_lwp): Don't set last_resume_kind here.
5227 (linux_kill): Use `mourn'.
5228 (linux_detach): Use `thread_db_detach', and `mourn'.
5230 (linux_attach_lwp_1): Adjust comment.
5231 (linux_attach): last_resume_kind moved the thread_info; adjust.
5232 (status_pending_p_callback): Adjust.
5233 (linux_wait_for_event_1): Adjust.
5234 (count_events_callback, select_singlestep_lwp_callback)
5235 (select_event_lwp_callback, cancel_breakpoints_callback)
5236 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5237 (proceed_one_lwp): Adjust.
5238 (linux_async): Add debug output.
5239 (linux_thread_stopped): New.
5240 (linux_pause_all): New.
5241 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5243 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5244 (thread_db_free): Delete declaration.
5245 (thread_db_detach, thread_db_mourn): Declare.
5246 * thread-db.c (thread_db_init): Use thread_db_mourn.
5247 (thread_db_free): Delete, split in two.
5248 (disable_thread_event_reporting): New.
5249 (thread_db_detach): New.
5250 (thread_db_mourn): New.
5252 * server.h (struct thread_info) <last_resume_kind>: New field.
5253 <attached>: Add comment.
5254 <gdb_detached>: New field.
5255 (handler_func): Change return type to int.
5256 (handle_serial_event, handle_target_event): Ditto.
5257 (gdb_connected): Declare.
5259 (disconnected_tracing): Declare.
5260 (stop_tracing): Declare.
5262 * server.c (handle_query) <qSupported>: Report support for
5263 disconnected tracing.
5264 (queue_stop_reply_callback): Account for running threads.
5265 (gdb_wants_thread_stopped): New.
5266 (gdb_wants_all_threads_stopped): New.
5267 (gdb_reattached_process): New.
5268 (handle_status): Clear the `gdb_detached' flag of all processes.
5269 In all-stop, stop all threads.
5270 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5271 (process_serial_event): If the remote connection breaks, or if an
5272 exit was forced with "monitor exit", force an event loop exit.
5273 Handle disconnected tracing on detach.
5274 (handle_serial_event): Adjust.
5275 (handle_target_event): If GDB isn't connected, forward events back
5276 to the inferior, unless the last process exited, in which case,
5277 exit gdbserver. Adjust interface.
5279 * remote-utils.c (remote_open): Don't block in accept. Instead
5280 register an event loop source on the listen socket file
5281 descriptor. Refactor bits into ...
5282 (listen_desc): ... this new global.
5283 (gdb_connected): ... this new function.
5284 (enable_async_notification): ... this new function.
5285 (handle_accept_event): ... this new function.
5286 (remote_close): Clear remote_desc.
5288 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5290 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5292 (mourn_inferior): Define.
5293 (target_process_qsupported): Avoid the dangling else problem.
5294 (thread_stopped): Define.
5295 (pause_all): Define.
5296 (target_waitstatus_to_string): Declare.
5297 * target.c (target_waitstatus_to_string): New.
5299 * tracepoint.c (tracing): Make extern.
5300 (disconnected_tracing): New.
5301 (stop_tracing): Make extern. Handle tracing stops due to GDB
5303 (cmd_qtdisconnected): New.
5304 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5305 (handle_tracepoint_general_set): Handle QTDisconnected.
5307 * event-loop.c (event_handler_func): Change return type to int.
5308 (process_event): Bail out if the event handler wants the event
5310 (handle_file_event): Ditto.
5311 (start_event_loop): Bail out if the event handler wants the event
5314 * nto-low.c (nto_target_ops): Adjust.
5315 * spu-low.c (spu_wait): Don't remove the process here.
5316 (spu_target_ops): Adjust.
5317 * win32-low.c (win32_wait): Don't remove the process here.
5318 (win32_target_ops): Adjust.
5320 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5322 * regcache.c (realloc_register_cache): Invalidate inferior's
5323 regcache before recreating it.
5325 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5327 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5329 2010-04-09 Stan Shebs <stan@codesourcery.com>
5330 Pedro Alves <pedro@codesourcery.com>
5332 * server.h (LONGEST): New.
5333 (struct thread_info) <while_stepping>: New field.
5334 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5336 (initialize_tracepoint, handle_tracepoint_general_set)
5337 (handle_tracepoint_query, tracepoint_finished_step)
5338 (tracepoint_was_hit, release_while_stepping_state_list):
5339 (current_traceframe): Declare.
5340 * server.c (handle_general_set): Handle tracepoint packets.
5342 (write_memory): New.
5343 (handle_search_memory_1): Use read_memory.
5344 (handle_query): Report support for conditional tracepoints, trace
5345 state variables, and tracepoint sources. Handle tracepoint
5347 (main): Initialize the tracepoints module.
5348 (process_serial_event): Handle traceframe reads/writes.
5350 * linux-low.c (handle_tracepoints): New.
5351 (linux_wait_1): Call it.
5352 (linux_resume_one_lwp): Handle while-stepping.
5353 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5354 (linux_target_ops): Install them.
5355 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5357 * linux-x86-low.c (x86_supports_tracepoints): New.
5358 (the_low_target). Install it.
5360 * mem-break.h (delete_breakpoint): Declare.
5361 * mem-break.c (delete_breakpoint): Make external.
5363 * target.h (struct target_ops): Add `supports_tracepoints',
5364 `read_pc', and `write_pc' fields.
5365 (target_supports_tracepoints): Define.
5366 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5369 * regcache.h (struct regcache) <registers_owned>: New field.
5370 (init_register_cache, regcache_cpy): Declare.
5371 (regcache_read_pc, regcache_write_pc): Declare.
5372 (register_cache_size): Declare.
5373 (supply_regblock): Declare.
5374 * regcache.c (init_register_cache): New.
5375 (new_register_cache): Use it.
5376 (regcache_cpy): New.
5377 (register_cache_size): New.
5378 (supply_regblock): New.
5379 (regcache_read_pc, regcache_write_pc): New.
5381 * tracepoint.c: New.
5383 * Makefile.in (OBS): Add tracepoint.o.
5384 (tracepoint.o): New rule.
5386 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5388 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5390 (i386-mmx.c): Likewise.
5391 (i386-mmx-linux.o): Likewise.
5392 (i386-mmx-linux.c): Likewise.
5394 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5395 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5396 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5397 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5399 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5400 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5401 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5403 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5405 * Makefile.in (clean): Updated.
5407 (i386-avx.c): Likewise.
5408 (i386-avx-linux.o): Likewise.
5409 (i386-avx-linux.c): Likewise.
5410 (amd64-avx.o): Likewise.
5411 (amd64-avx.c): Likewise.
5412 (amd64-avx-linux.o): Likewise.
5413 (amd64-avx-linux.c): Likewise.
5415 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5416 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5417 (srv_amd64_regobj): Add amd64-avx.o.
5418 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5419 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5420 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5421 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5422 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5423 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5426 * i387-fp.c: Include "i386-xstate.h".
5428 (i387_cache_to_xsave): Likewise.
5429 (i387_xsave_to_cache): Likewise.
5430 (x86_xcr0): Likewise.
5432 * i387-fp.h (i387_cache_to_xsave): Likewise.
5433 (i387_xsave_to_cache): Likewise.
5434 (x86_xcr0): Likewise.
5436 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5437 * linux-crisv32-low.c (target_regsets): Likewise.
5438 * linux-m68k-low.c (target_regsets): Likewise.
5439 * linux-mips-low.c (target_regsets): Likewise.
5440 * linux-ppc-low.c (target_regsets): Likewise.
5441 * linux-s390-low.c (target_regsets): Likewise.
5442 * linux-sh-low.c (target_regsets): Likewise.
5443 * linux-sparc-low.c (target_regsets): Likewise.
5444 * linux-xtensa-low.c (target_regsets): Likewise.
5446 * linux-low.c: Include <sys/uio.h>.
5447 (regsets_fetch_inferior_registers): Support nt_type.
5448 (regsets_store_inferior_registers): Likewise.
5449 (linux_process_qsupported): New.
5450 (linux_target_ops): Add linux_process_qsupported.
5452 * linux-low.h (regset_info): Add nt_type.
5453 (linux_target_ops): Add process_qsupported.
5455 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5457 (init_registers_i386_avx_linux): New.
5458 (init_registers_amd64_avx_linux): Likewise.
5459 (xmltarget_i386_linux_no_xml): Likewise.
5460 (xmltarget_amd64_linux_no_xml): Likewise.
5461 (PTRACE_GETREGSET): Likewise.
5462 (PTRACE_SETREGSET): Likewise.
5463 (x86_fill_xstateregset): Likewise.
5464 (x86_store_xstateregset): Likewise.
5465 (use_xml): Likewise.
5466 (x86_linux_update_xmltarget): Likewise.
5467 (x86_linux_process_qsupported): Likewise.
5468 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5469 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5470 init_registers_i386_linux here. Call
5471 x86_linux_update_xmltarget.
5472 (the_low_target): Add x86_linux_process_qsupported.
5474 * server.c (handle_query): Call target_process_qsupported.
5476 * target.h (target_ops): Add process_qsupported.
5477 (target_process_qsupported): New.
5479 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5481 * inferiors.c (add_thread): Set last_status kind to
5482 TARGET_WAITKIND_IGNORE.
5483 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5484 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5485 (linux_wait_1): Move `thread' local definition to block that uses
5486 it. Don't NULL initialize `event_child'.
5487 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5488 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5489 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5491 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5493 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5494 an extended waitstatus, or by a watchpoint.
5495 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5496 thread was stepping or has been stopped by a watchpoint.
5498 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5500 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5501 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5502 of another, then delete the previous, and validate all
5504 (validate_inserted_breakpoint): New.
5505 (delete_disabled_breakpoints): New.
5506 (validate_breakpoints): New.
5507 (check_mem_read): Validate breakpoints before trusting their
5508 shadow. Delete disabled breakpoints.
5509 (check_mem_write): Validate breakpoints before trusting they
5510 should be inserted. Delete disabled breakpoints.
5511 * mem-break.h (validate_breakpoints):
5512 * server.c (handle_query): Validate breakpoints when we see a
5515 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5517 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5518 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5519 if we could tell there's a GDB breakpoint at stop_pc.
5520 (need_step_over_p): Don't do a step over if we find a GDB
5521 breakpoint at the resume PC.
5523 * mem-break.c (struct raw_breakpoint): New.
5524 (enum bkpt_type): New type `gdb_breakpoint'.
5525 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5526 fields. New field `raw'.
5527 (find_raw_breakpoint_at): New.
5528 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5530 (set_breakpoint_at): Adjust.
5531 (delete_raw_breakpoint): New.
5532 (release_breakpoint): New.
5533 (delete_breakpoint): Rename to...
5534 (delete_breakpoint_1): ... this. Add proc parameter. Use
5535 release_breakpoint. Return ENOENT.
5536 (delete_breakpoint): Reimplement.
5537 (find_breakpoint_at): Delete.
5538 (find_gdb_breakpoint_at): New.
5539 (delete_breakpoint_at): Delete.
5540 (set_gdb_breakpoint_at): New.
5541 (delete_gdb_breakpoint_at): New.
5542 (gdb_breakpoint_here): New.
5543 (set_reinsert_breakpoint): Use release_breakpoint.
5544 (uninsert_breakpoint): Rename to ...
5545 (uninsert_raw_breakpoint): ... this.
5546 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5547 (reinsert_raw_breakpoint): Change parameter type to
5549 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5551 (check_breakpoints): Adjust. Use release_breakpoint.
5552 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5553 (breakpoint_inserted_here): Ditto.
5554 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5555 Don't trust the breakpoint's shadow if it is not inserted.
5556 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5557 (delete_all_breakpoints): Adjust.
5558 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5559 use delete_breakpoint_1.
5561 * mem-break.h (breakpoints_supported): Delete declaration.
5562 (set_gdb_breakpoint_at): Declare.
5563 (gdb_breakpoint_here): Declare.
5564 (delete_breakpoint_at): Delete.
5565 (delete_gdb_breakpoint_at): Declare.
5567 * server.h (struct raw_breakpoint): Forward declare.
5568 (struct process_info): New field `raw_breakpoints'.
5570 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5573 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5575 * linux-low.c (status_pending_p_callback): Fix comment.
5576 (linux_wait_for_event_1): Move most of the internal breakpoint
5577 handling from here...
5578 (linux_wait_1): ... to here.
5579 (count_events_callback): New.
5580 (select_singlestep_lwp_callback): New.
5581 (select_event_lwp_callback): New.
5582 (cancel_breakpoints_callback): New.
5583 (select_event_lwp): New.
5584 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5585 priority to all LWPs that have had events that should be reported
5586 to the client. Cancel breakpoints when about to reporting the
5587 event to the client, not while stopping lwps. No longer cancel
5588 finished single-steps here.
5589 (cancel_finished_single_step): Delete.
5590 (cancel_finished_single_steps): Delete.
5592 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5594 * mem-break.c (enum bkpt_type): New.
5595 (struct breakpoint): New field `type'.
5596 (set_breakpoint_at): Change return type to struct breakpoint
5597 pointer. Set type to `other_breakpoint' by default.
5598 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5599 in the breakpoint list.
5600 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5601 (reinsert_breakpoint): Rename to ...
5602 (reinsert_raw_breakpoint): ... this.
5603 (reinsert_breakpoints_at): Adjust.
5604 * mem-break.h (struct breakpoint): Declare.
5605 (set_breakpoint_at): Change return type to struct breakpoint
5608 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5610 * server.c (handle_query): Assign, not compare.
5612 2010-03-24 Pedro Alves <pedro@codesourcery.com>
5614 Teach linux gdbserver to step-over-breakpoints.
5616 * linux-low.c (can_hardware_single_step): New.
5617 (supports_breakpoints): New.
5618 (handle_extended_wait): If stopping threads, read the stop pc of
5621 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5622 low target doesn't support retrieving the PC.
5623 (add_lwp): Set last_resume_kind to resume_continue.
5624 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5625 (linux_attach): Don't clear stop_expected. Set the lwp's
5626 last_resume_kind to resume_stop.
5627 (linux_detach_one_lwp): Don't check for removed breakpoints.
5628 (check_removed_breakpoint): Delete.
5629 (status_pending_p): Rename to ...
5630 (status_pending_p_callback): ... this. Don't check for removed
5631 breakpoints. Don't consider threads that are stopped from GDB's
5633 (linux_wait_for_lwp): Always read the stop_pc here.
5634 (cancel_breakpoint): New.
5635 (step_over_bkpt): New global.
5636 (linux_wait_for_event_1): Implement stepping over breakpoints.
5637 (gdb_wants_lwp_stopped): New.
5638 (gdb_wants_all_stopped): New.
5639 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5640 single-step traps here. Store the thread's last reported target
5642 (send_sigstop): Don't clear stop_expected. Always set it,
5644 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5645 (cancel_finished_single_step): New.
5646 (cancel_finished_single_steps): New.
5647 (wait_for_sigstop): Don't cancel finished single-step traps here.
5648 (linux_resume_one_lwp): Don't check for removed breakpoints.
5649 Don't set `step' on non-hardware step archs.
5650 (linux_set_resume_request): Ignore resume_stop requests if already
5651 stopping or stopped. Set the lwp's last_resume_kind.
5652 (resume_status_pending_p): Don't check for removed breakpoints.
5653 (need_step_over_p): New.
5654 (start_step_over): New.
5655 (finish_step_over): New.
5656 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5657 requests. Clear the thread's last reported target waitstatus.
5658 Don't use the `suspended' flag. Don't consider pending breakpoints.
5659 (linux_resume): Start a step-over if necessary.
5660 (proceed_one_lwp): New.
5661 (proceed_all_lwps): New.
5662 (unstop_all_lwps): New.
5663 * linux-low.h (struct lwp_info): Rewrite comment for the
5664 `suspended' flag. Add the `stop_pc' field. Delete the
5665 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5666 Add `'last_resume_kind' and `need_step_over' fields.
5667 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5668 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5669 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5670 (set_raw_breakpoint_at): New.
5671 (set_breakpoint_at): Rewrite to use it.
5672 (reinsert_breakpoint_handler): Delete.
5673 (set_reinsert_breakpoint): New.
5674 (reinsert_breakpoint_by_bp): Delete.
5675 (delete_reinsert_breakpoints): New.
5676 (uninsert_breakpoint): Rewrite.
5677 (uninsert_breakpoints_at): New.
5678 (reinsert_breakpoint): Rewrite.
5679 (reinsert_breakpoints_at): New.
5680 (check_breakpoints): Rewrite.
5681 (breakpoint_here): New.
5682 (breakpoint_inserted_here): New.
5683 (check_mem_read): Adjust.
5684 * mem-break.h (breakpoints_supported, breakpoint_here)
5685 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5686 (reinsert_breakpoint_by_bp): Delete declaration.
5687 (delete_reinsert_breakpoints): Declare.
5688 (reinsert_breakpoint): Delete declaration.
5689 (reinsert_breakpoints_at): Declare.
5690 (uninsert_breakpoint): Delete declaration.
5691 (uninsert_breakpoints_at): Declare.
5692 (check_breakpoints): Adjust prototype.
5693 * server.h: Adjust include order.
5694 (struct thread_info): Declare here. Add a `last_status' field.
5696 2010-03-23 Michael Snyder <msnyder@vmware.com>
5698 * server.c (crc32): New function.
5699 (handle_query): Add handling for 'qCRC:' request.
5701 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5703 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5704 lwp had been stopped by a watchpoint.
5706 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5708 * server.h (internal_error): Declare.
5709 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5710 * utils.c (internal_error): New function.
5712 2010-03-15 Andreas Schwab <schwab@redhat.com>
5714 * configure.srv: Fix typo setting srv_regobj.
5716 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5718 * linux-low.c (fetch_register): Avoid passing a non string literal
5720 (usr_store_inferior_registers): Ditto.
5722 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5724 * linux-low.c (linux_write_memory): Bail out early if peeking
5727 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5729 * linux-low.h (struct lwp_info): New fields
5730 `stopped_by_watchpoint' and `stopped_data_address'.
5731 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5732 here, and cache them in the lwp object.
5733 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5735 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5737 (linux_stopped_by_watchpoint): Rewrite.
5738 (linux_stopped_data_address): Rewrite.
5740 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5742 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5743 switching the current inferior, not before.
5745 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5747 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5748 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5749 i386-linux.c and amd64-linux.c.
5750 (reg-i386.o): Removed.
5751 (reg-i386.c): Likewise.
5752 (reg-i386-linux.o): Likewise.
5753 (reg-i386-linux.c): Likewise.
5754 (reg-x86-64.o): Likewise.
5755 (reg-x86-64.c): Likewise.
5756 (reg-x86-64-linux.o): Likewise.
5757 (reg-x86-64-linux.c): Likewise.
5760 (i386-linux.o): Likewise.
5761 (i386-linux.c): Likewise.
5762 (amd64.o): Likewise.
5763 (amd64.c): Likewise.
5764 (amd64-linux.o): Likewise.
5765 (amd64-linux.c): Likewise.
5767 * configure.srv (srv_i386_regobj): New.
5768 (srv_i386_linux_regobj): Likewise.
5769 (srv_amd64_regobj): Likewise.
5770 (srv_amd64_linux_regobj): Likewise.
5771 (srv_i386_32bit_xmlfiles): Likewise.
5772 (srv_i386_64bit_xmlfiles): Likewise.
5773 (srv_i386_xmlfiles): Likewise.
5774 (srv_amd64_xmlfiles): Likewise.
5775 (srv_i386_linux_xmlfiles): Likewise.
5776 (srv_amd64_linux_xmlfiles): Likewise.
5777 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5778 srv_xmlfiles to $srv_i386_xmlfiles.
5779 (i[34567]86-*-mingw32ce*): Likewise.
5780 (i[34567]86-*-mingw*): Likewise.
5781 (i[34567]86-*-nto*): Likewise.
5782 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5783 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5784 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5785 (x86_64-*-linux*): Likewise.
5787 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5788 (init_registers_amd64_linux): New.
5789 (x86_arch_setup): Replace init_registers_x86_64_linux with
5790 init_registers_amd64_linux.
5792 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5794 * configure.ac: Check for libdl. If it is not available link against
5795 static libthread_db.
5796 * configure: Regenerate.
5798 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5802 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5803 handing a read watchpoint.
5804 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5806 2010-02-12 Doug Evans <dje@google.com>
5808 * linux-low.c (linux_supports_tracefork_flag): Document.
5809 (linux_look_up_symbols): Add comment.
5811 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5813 * regcache.c (supply_register): Clear regcache if buf is NULL.
5815 2010-02-02 Nicolas Roche <roche@sourceware.org>
5816 Joel Brobecker <brobecker@adacore.com>
5818 * inferiors.c (find_inferior): Add function documentation.
5819 (unloaded_dll): Handle the case where the unloaded dll has not
5820 been previously registered in the dll list.
5822 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5824 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5825 (thumb2_breakpoint): New.
5826 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5828 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5830 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5831 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5834 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5836 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5838 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5840 * linux-s390-low.c (s390_collect_ptrace_register)
5841 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5843 2010-01-21 Doug Evans <dje@google.com>
5845 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5846 (PTRACE_ARG4_TYPE): New macro.
5847 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5848 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5849 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5850 (usr_store_inferior_registers): Ditto.
5851 (linux_read_memory, linux_write_memory): Ditto.
5852 (linux_test_for_tracefork): Ditto.
5854 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5855 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5857 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5859 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5862 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5864 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5865 prototype to take a regcache. Adjust.
5867 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5869 * regcache.h (struct thread_info): Forward declare.
5870 (struct regcache): New.
5871 (new_register_cache): Adjust prototype.
5872 (get_thread_regcache): Declare.
5873 (free_register_cache): Adjust prototype.
5874 (registers_to_string, registers_from_string): Ditto.
5875 (supply_register, supply_register_by_name, collect_register)
5876 (collect_register_as_string, collect_register_by_name): Ditto.
5877 * regcache.c (struct inferior_regcache_data): Delete.
5878 (get_regcache): Rename to ...
5879 (get_thread_regcache): ... this. Adjust. Switch inferior before
5881 (regcache_invalidate_one): Adjust.
5882 (regcache_invalidate): Fix prototype.
5883 (new_register_cache): Return the new register cache.
5884 (free_register_cache): Change prototype.
5885 (realloc_register_cache): Adjust.
5886 (registers_to_string): Change prototype to take a regcache. Adjust.
5887 (registers_from_string): Ditto.
5888 (register_data): Ditto.
5889 (supply_register): Ditto.
5890 (supply_register_by_name): Ditto.
5891 (collect_register): Ditto.
5892 (collect_register_as_string): Ditto.
5893 (collect_register_by_name): Ditto.
5894 * server.c (process_serial_event): Adjust.
5895 * linux-low.h (regset_fill_func, regset_store_func): Change
5897 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5899 * linux-low.c (get_stop_pc): Adjust.
5900 (check_removed_breakpoint): Adjust.
5901 (linux_wait_for_event): Adjust.
5902 (linux_resume_one_lwp): Adjust.
5903 (fetch_register): Add regcache parameter. Adjust.
5904 (usr_store_inferior_registers): Ditto.
5905 (regsets_fetch_inferior_registers): Ditto.
5906 (regsets_store_inferior_registers): Ditto.
5907 (linux_fetch_registers, linux_store_registers): Ditto.
5908 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5910 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5912 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5913 prototype to take a regcache.
5914 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5915 * remote-utils.c (convert_ascii_to_int, outreg)
5916 (prepare_resume_reply): Change prototype to take a regcache.
5918 * target.h (struct target_ops) <fetch_registers, store_registers>:
5919 Change prototype to take a regcache.
5920 (fetch_inferior_registers, store_inferior_registers): Change
5921 prototype to take a regcache. Adjust.
5922 * proc-service.c (ps_lgetregs): Adjust.
5923 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5924 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5925 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5926 take a regcache. Adjust.
5927 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5928 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5929 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5930 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5931 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5932 (cris_cannot_fetch_register):
5933 (cris_breakpoint_at): Change prototype to take a regcache.
5935 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5936 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5937 to take a regcache. Adjust.
5938 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5940 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5941 take a regcache. Adjust.
5942 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5943 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5944 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5945 * linux-mips-low.c (mips_get_pc):
5946 (mips_set_pc): Change prototype to take a regcache. Adjust.
5947 (mips_reinsert_addr): Adjust.
5948 (mips_collect_register): Change prototype to take a regcache.
5950 (mips_supply_register):
5951 (mips_collect_register_32bit, mips_supply_register_32bit)
5952 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5953 (mips_store_fpregset): Ditto.
5954 * linux-ppc-low.c (ppc_supply_ptrace_register)
5955 (ppc_supply_ptrace_register): Ditto.
5956 (parse_spufs_run): Adjust.
5957 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5958 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5959 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5960 take a regcache. Adjust.
5961 * linux-s390-low.c (s390_collect_ptrace_register)
5962 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5963 (s390_set_pc): Change prototype to take a regcache. Adjust.
5964 (s390_arch_setup): Adjust.
5965 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5966 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5967 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5968 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5969 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5971 (sparc_breakpoint_at): Adjust.
5972 * linux-xtensa-low.c (xtensa_fill_gregset):
5973 (xtensa_store_gregset):
5974 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5975 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5976 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5977 prototype to take a regcache. Adjust.
5978 * win32-arm-low.c (arm_fetch_inferior_register)
5979 (arm_store_inferior_register): Change prototype to take a
5981 * win32-i386-low.c (i386_fetch_inferior_register)
5982 (i386_store_inferior_register): Change prototype to take a
5984 * win32-low.c (child_fetch_inferior_registers)
5985 (child_store_inferior_registers): Change prototype to take a
5987 (win32_wait): Adjust.
5988 (win32_fetch_inferior_registers): Change prototype to take a
5990 (win32_store_inferior_registers): Adjust.
5991 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5992 store_inferior_register>: Change prototype to take a regcache.
5994 2010-01-20 Doug Evans <dje@google.com>
5996 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5998 (linux_wait_for_event1, linux_init_signals): Ditto.
5999 (W_STOPCODE): Provide definition if missing.
6001 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6003 * linux-low.c (linux_core_of_thread): New.
6004 (compare_ints, show_process, list_threads): New.
6005 (linux_qxfer_osdata): Report threads and cores.
6006 (linux_target_op): Register linux_core_of_thread.
6007 * remote-utils.c (prepare_resume_reply): Report the core.
6008 (buffer_xml_printf): Support %d specifier.
6009 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6011 (handle_query): Handle qXfer:threads. Announce availability
6013 * target.h (struct target_ops): New field core_of_thread.
6015 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6017 * Makefile.in (clean): Remove new generated files.
6018 (reg-s390.o, reg-s390.c): Remove rules.
6019 (reg-s390x.o, reg-s390x.c): Likewise.
6020 (s390-linux32.o, s390-linux32.c): Add rules.
6021 (s390-linux64.o, s390-linux64.c): Likewise.
6022 (s390x-linux64.o, s390x-linux64.c): Likewise.
6023 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6024 * linux-s390-low.c: Include <elf.h>.
6025 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6026 (init_registers_s390): Remove prototype.
6027 (init_registers_s390x): Likewise.
6028 (init_registers_s390_linux32): Add prototype.
6029 (init_registers_s390_linux64): Likewise.
6030 (init_registers_s390x_linux64): Likewise.
6031 (s390_num_regs_3264): New define.
6032 (s390_regmap_3264): New global variable.
6033 (s390_cannot_fetch_register): Remove obsolete check.
6034 (s390_cannot_store_register): Likewise.
6035 (s390_collect_ptrace_register): Handle upper/lower register halves.
6036 (s390_supply_ptrace_register): Likewise.
6037 (s390_fill_gregset): Update to register number changes.
6038 (s390_get_hwcap): New routine.
6039 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6040 Install appropriate regmap and register set.
6042 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6044 * server.c (gdbserver_version): Update copyright year to 2010.
6045 * gdbreplay.c (gdbreplay_version): Likewise.
6047 2009-12-28 Doug Evans <dje@google.com>
6049 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6050 elf/external.h. Include <elf.h> instead but only if necessary.
6052 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6054 * linux-low.c (linux_remove_process): Remove `detaching'
6055 parameter. Don't release/detach from thread_db here.
6056 (linux_kill): Release/detach from thread_db here, ...
6057 (linux_detach): ... and here, before actually detaching.
6058 (linux_wait_1): ... and here, when a process exits.
6059 * thread-db.c (any_thread_of): New.
6060 (thread_db_free): Switch the current inferior to a thread of the
6063 2009-12-21 Doug Evans <dje@google.com>
6065 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6067 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6068 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6069 warning ifndef __NR_tkill. Move setting of errno there too.
6070 Delete unnecessary resetting of errno after syscall.
6071 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6073 * configure.ac: Check for dladdr.
6074 * config.in: Regenerate.
6075 * configure: Regenerate.
6076 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6077 (try_thread_db_load): Update.
6079 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6081 2009-12-18 Doug Evans <dje@google.com>
6083 * event-loop.c: Include unistd.h if it exists.
6085 * linux-low.c (my_waitpid): Move definition away from being in
6086 between linux_tracefork_child/linux_test_for_tracefork.
6088 * gdb_proc_service.h (psaddr_t): Fix type.
6089 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6090 signature to match glibc.
6092 2009-12-16 Doug Evans <dje@google.com>
6094 * linux-low.c (linux_read_memory): Fix argument to read.
6096 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6098 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6099 events, don't leave current_inferior pointing at null.
6101 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6103 * win32-low.c (LOG): Delete.
6104 (OUTMSG): Output to stderr.
6105 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6106 on compile time LOG macro.
6107 (win32_wait): Fix debug output.
6109 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6111 * win32-low.c (win32_add_one_solib): If the dll name is
6112 "ntdll.dll", prepend the system directory to the dll path.
6114 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6116 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6118 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6119 Vladimir Prus <vladimir@codesourcery.com>
6121 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6122 * configure.ac: Check for __mcoldfire__ and set
6123 gdb_cv_m68k_is_coldfire.
6124 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6125 reg-cf.o and reg-m68k.o.
6126 * configure: Regenerated.
6128 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6130 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6131 Pass it to thread_db_free.
6132 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6133 proper `detaching' argument to linux_remove_process.
6134 * linux-low.h (thread_db_free): Add `detaching' parameter.
6135 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6137 (thread_db_free): Add `detaching' parameter. Only
6138 call td_ta_clear_event if detaching from process.
6140 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6142 * thread-db.c (thread_db_free): Fix typo.
6144 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6147 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6149 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6151 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6152 with an i686 compiler.
6153 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6155 * configure: Rebuilt.
6157 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6161 * server.c (handle_search_memory_1): Correct read_addr initialization
6162 in loop for searching subsequent chunks.
6164 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6166 * configure.ac: New --with-libthread-db option.
6167 * thread-db.c: Allow direct dependence on libthread_db.
6168 (thread_db_free): Adjust.
6169 * config.in: Regenerate.
6170 * configure: Likewise.
6172 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6175 * thread-db.c (attach_thread): New function.
6176 (maybe_attach_thread): Return success/failure.
6177 (find_new_threads_callback): Adjust.
6178 (thread_db_find_new_threads): Loop until no new threads.
6180 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6182 * proc-service.c (ps_lgetregs): Formatting.
6184 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6186 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6187 * configure.ac: Adjust.
6188 * linux-low.h (struct process_info_private): Move members to struct
6190 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6191 * linux-low.c (linux_remove_process): Adjust.
6192 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6193 * server.c (handle_query): Move code ...
6194 (handle_monitor_command): ... here. New function.
6195 * target.h (struct target_ops): New member.
6196 * thread-db.c (struct thread_db): New.
6197 (libthread_db_search_path): New variable.
6198 (thread_db_create_event, thread_db_enable_reporting)
6199 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6200 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6201 (try_thread_db_load_1, dladdr_to_soname): New functions.
6202 (try_thread_db_load, thread_db_load_search): New functions.
6203 (thread_db_init): Search for libthread_db.
6204 (thread_db_free): New function.
6205 (thread_db_handle_monitor_command): Likewise.
6206 * config.in: Regenerate.
6207 * configure: Regenerate.
6209 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6211 * spu-low.c (spu_kill): Wait for inferior to terminate.
6212 Call clear_inferiors.
6213 (spu_detach): Call clear_inferiors.
6215 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6217 * aclocal.m4: Regenerate.
6218 * config.in: Likewise.
6219 * configure: Likewise.
6221 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6223 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6224 (parse_spufs_run): New function.
6225 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6226 (ppc_breakpoint_at): Handle SPU breakpoints.
6228 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6230 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6231 (SPUFS_MAGIC): Define.
6232 (spu_enumerate_spu_ids): New function.
6233 (linux_qxfer_spu): New function.
6234 (linux_target_ops): Install linux_qxfer_spu.
6236 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6238 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6239 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6240 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6241 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6242 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6243 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6244 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6245 (init_registers_powerpc_cell32l): Add prototype.
6246 (init_registers_powerpc_cell64l): Likewise.
6247 (ppc_arch_setup): Detect Cell/B.E. architecture.
6249 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6251 * Makefile.in (datarootdir): New variable.
6253 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6255 * linux-low.c (linux_write_memory): Update debugging output.
6256 * Makefile.in (clean): Add new descriptions.
6257 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6258 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6259 * configure.srv: Add new files for arm*-*-linux*.
6260 * linux-arm-low.c: Add new declarations.
6261 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6262 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6263 (HWCAP_VFPv3D16): New.
6264 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6265 instead of __IWMMXT__.
6266 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6267 (arm_arch_setup): New.
6268 (target_regsets): Remove #ifdef. Add VFP regset.
6269 (the_low_target): Use arm_arch_setup.
6271 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6273 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6274 the main thread again.
6276 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6278 Adding Neutrino gdbserver.
6279 * configure: Regenerated.
6280 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6281 * configure.srv (i[34567]86-*-nto*): New target.
6282 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6283 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6284 (nto_comctrl) [__QNX__]: New function.
6285 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6287 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6289 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6292 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6293 Pedro Alves <pedro@codesourcery.com>
6295 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6296 don't support CONTEXT_EXTENDED_REGISTERS.
6297 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6298 (the_low_target): Install them.
6299 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6300 failing with ERROR_PIPE_NOT_CONNECTED.
6302 2009-06-30 Doug Evans <dje@google.com>
6303 Pierre Muller <muller@ics.u-strasbg.fr>
6305 Add h/w watchpoint support to x86-linux, win32-i386.
6306 * Makefile.in (SFILES): Add i386-low.c
6307 (i386_low_h): Define.
6308 (i386-low.o): Add dependencies.
6309 (linux-x86-low.o): Add i386-low.h dependency.
6310 (win32-i386-low.o): Ditto.
6311 * i386-low.c: New file.
6312 * i386-low.h: New file.
6313 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6314 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6315 * linux-low.c (linux_add_process): Initialize arch_private.
6316 (linux_remove_process): Free arch_private.
6317 (add_lwp): Initialize arch_private.
6318 (delete_lwp): Free arch_private.
6319 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6321 * linux-low.h (process_info_private): New member arch_private.
6322 (lwp_info): New member arch_private.
6323 (linux_target_ops): New members new_process, new_thread,
6325 (ptid_of): New macro.
6326 * linux-x86-low.c: Include stddef.h, i386-low.h.
6327 (arch_process_info): New struct.
6328 (arch_lwp_info): New struct.
6329 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6330 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6331 (i386_dr_low_get_status): New function.
6332 (x86_insert_point, x86_remove_point): New functions.
6333 (x86_stopped_by_watchpoint): New function.
6334 (x86_stopped_data_address): New function.
6335 (x86_linux_new_process, x86_linux_new_thread): New functions.
6336 (x86_linux_prepare_to_resume): New function.
6337 (the_low_target): Add entries for insert_point, remove_point,
6338 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6340 * server.c (debug_hw_points): New global.
6341 (monitor_show_help): Document set debug-hw-points.
6342 (handle_query): Process "set debug-hw-points".
6343 * server.h (debug_hw_points): Declare.
6344 (paddress): Declare.
6345 * utils.c (NUMCELLS, CELLSIZE): New macros.
6346 (get_sell, xsnprintf, paddress): New functions.
6347 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6348 remove_point, stopped_by_watchpoint, stopped_data_address.
6349 * win32-i386-low.c: Include i386-low.h.
6350 (debug_reg_state): Replaces dr.
6351 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6352 (i386_dr_low_get_status): New function.
6353 (i386_insert_point, i386_remove_point): New functions.
6354 (i386_stopped_by_watchpoint): New function.
6355 (i386_stopped_data_address): New function.
6356 (i386_initial_stuff): Update.
6357 (get_thread_context,set_thread_context,i386_thread_added): Update.
6358 (the_low_target): Add entries for insert_point,
6359 remove_point, stopped_by_watchpoint, stopped_data_address.
6360 * win32-low.c (win32_insert_watchpoint): New function.
6361 (win32_remove_watchpoint): New function.
6362 (win32_stopped_by_watchpoint): New function.
6363 (win32_stopped_data_address): New function.
6364 (win32_target_ops): Add entries for insert_watchpoint,
6365 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6366 * win32-low.h (win32_target_ops): New members insert_point,
6367 remove_point, stopped_by_watchpoint, stopped_data_address.
6369 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6371 * server.c (process_serial_event): Re-return unsupported, not
6372 error, if the type isn't recognized. Re-allow supporting only
6373 insert or remove packets. Also call require_running for
6374 breakpoints. Add missing break statement to default case. Tidy.
6375 * target.h (struct target_ops): Rename insert_watchpoint to
6376 insert_point, and remove_watchpoint to remove_point.
6378 * linux-low.h (struct linux_target_ops): Likewise.
6379 * linux-low.c (linux_insert_watchpoint): Rename to ...
6380 (linux_insert_point): ... this. Adjust.
6381 (linux_remove_watchpoint): Rename to ...
6382 (linux_remove_point): ... this. Adjust.
6383 (linux_target_ops): Adjust.
6384 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6385 (cris_insert_point): ... this.
6386 (cris_remove_watchpoint): Rename to ...
6387 (cris_remove_point): ... this.
6388 (the_low_target): Adjust.
6390 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6392 * server.c (handle_v_kill): Pass signal_pid to
6393 kill_inferior if multi_process is zero.
6395 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6397 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6398 * target.h (target_ops): Comment for *_watchpoint to make it clear
6399 the functions can get types '0' and '1'.
6401 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6403 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6404 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6405 * regcache.c (get_regcache): Likewise.
6406 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6407 * win32-low.c (child_fetch_inferior_registers): Remove check for
6410 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6411 Pedro Alves <pedro@codesourcery.com>
6413 * target.h (struct target_ops) <supports_multi_process>: New
6415 (target_supports_multi_process): New.
6416 * server.c (handle_query): Even if GDB reports support, only
6417 enable multi-process if the target also supports it. Report
6418 multi-process support only if the target backend supports it.
6419 * linux-low.c (linux_supports_multi_process): New function.
6420 (linux_target_ops): Install it as target_supports_multi_process
6423 2009-05-24 Doug Evans <dje@google.com>
6425 Global renaming of find_thread_pid to find_thread_ptid.
6426 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6427 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6428 All callers updated.
6430 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6431 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6434 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6435 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6436 (linux_resume_one_lwp): Ditto.
6438 2009-05-23 Doug Evans <dje@google.com>
6440 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6441 from struct inferior_list_entry * to struct lwp_info *.
6442 All callers updated.
6444 2009-05-13 Doug Evans <dje@google.com>
6446 * linux-x86-low.c: Don't include assert.h.
6447 (x86_siginfo_fixup): Use fatal, not assert.
6448 (x86_arch_setup): Fix comment.
6450 2009-05-12 Doug Evans <dje@google.com>
6452 Biarch support for i386/amd64 gdbserver.
6453 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6454 Add linux-x86-low.c.
6455 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6456 (linux-x86-low.o): Add.
6457 * linux-x86-64-low.c: Delete.
6458 * linux-i386-low.c: Delete.
6459 * linux-x86-low.c: New file.
6460 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6462 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6464 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6465 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6466 (linux_child_pid_to_exec_file): New function.
6467 (elf_64_header_p, elf_64_file_p): New functions.
6468 (siginfo_fixup): New function.
6469 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6470 give target a chance to convert layout.
6471 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6472 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6474 2009-05-07 Doug Evans <dje@google.com>
6476 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6477 (regsets_store_inferior_registers): Ditto.
6479 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6483 * linux-low.c (must_set_ptrace_flags): Delete.
6484 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6486 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6487 `lwp->must_set_ptrace_flags' instead.
6488 (linux_wait_for_event_1): Set ptrace options here.
6489 (linux_wait_1): ... not here.
6491 2009-04-30 Doug Evans <dje@google.com>
6493 * inferiors.c (started_inferior_callback): New function.
6494 (attached_inferior_callback): New function.
6495 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6496 * server.c (print_started_pid, print_attached_pid): New functions.
6497 (detach_or_kill_for_exit): New function.
6498 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6499 * server.h (have_started_inferiors_p): Declare.
6500 (have_attached_inferiors_p): Declare.
6502 * inferiors.c (remove_process): Fix memory leak, free process.
6503 * linux-low.c (linux_remove_process): New function.
6504 (linux_kill): Call it instead of remove_process.
6505 (linux_detach, linux_wait_1): Ditto.
6507 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6509 * configure.srv: Add x86 Windows CE target.
6511 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6513 * inferiors.c (get_thread_process): Make global.
6514 * server.h (get_thread_process): Add prototype.
6515 * thread-db.c (find_one_thread): Use get_thread_process
6516 instead of current_process.
6517 (thread_db_get_tls_address): Do not crash if called when
6518 thread layer is not yet initialized.
6520 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6522 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6523 * spu-low.c (current_tid): Rename to ...
6524 (current_ptid): ... this.
6525 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6526 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6527 ptid_get_lwp (current_ptid) instead of current_tid.
6528 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6529 instead of current_tid. Use find_process_pid to verify pid
6530 argument is valid. Pass proper argument to remove_process.
6531 (spu_thread_alive): Compare current_ptid instead of current_tid.
6532 (spu_resume): Likewise.
6534 2009-04-02 Pedro Alves <pedro@codesourcery.com>
6536 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6539 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6541 Implement the multiprocess extensions, and add linux multiprocess
6544 * server.h (ULONGEST): Declare.
6545 (struct ptid, ptid_t): New.
6546 (minus_one_ptid, null_ptid): Declare.
6547 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6548 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6549 (struct inferior_list_entry): Change `id' type from unsigned from
6551 (struct sym_cache, struct breakpoint, struct
6552 process_info_private): Forward declare.
6553 (struct process_info): Declare.
6554 (current_process): Declare.
6555 (all_processes): Declare.
6556 (initialize_inferiors): Declare.
6557 (add_thread): Adjust to use ptid_t.
6558 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6559 (add_process, remove_process, find_thread_pid): Declare.
6560 (find_inferior_id): Adjust to use ptid_t.
6561 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6562 (multi_process): Declare.
6563 (push_event): Adjust to use ptid_t.
6564 (read_ptid, write_ptid): Declare.
6565 (prepare_resume_reply): Adjust to use ptid_t.
6566 (clear_symbol_cache): Declare.
6567 * inferiors.c (all_processes): New.
6568 (null_ptid, minus_one_ptid): New.
6569 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6570 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6571 (add_thread): Change unsigned long to ptid. Remove gdb_id
6573 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6574 (gdb_id_to_thread): Rename to ...
6575 (find_thread_pid): ... this. Change unsigned long to ptid.
6576 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6577 (loaded_dll, pull_pid_from_list): Adjust.
6578 (add_process, remove_process, find_process_pid)
6579 (get_thread_process, current_process, initialize_inferiors): New.
6580 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6581 (struct target_waitstatus) <related_pid>: Ditto.
6582 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6584 (struct target_ops) <join>: Add `pid' argument.
6585 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6586 (struct target_ops) <wait>: Add `ptid' field. Change return type
6588 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6589 (mywait): Add `ptid' argument. Change return type to ptid_t.
6590 (target_pid_to_str): Declare.
6591 * target.c (set_desired_inferior): Adjust to use ptids.
6592 (mywait): Add new `ptid' argument. Adjust.
6593 (target_pid_to_str): New.
6594 * mem-break.h (free_all_breakpoints): Declare.
6595 * mem-break.c (breakpoints): Delelete.
6596 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6597 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6598 to use per-process breakpoint list.
6599 (free_all_breakpoints): New.
6600 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6601 (symbol_cache, all_symbols_looked_up): Delete.
6603 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6605 (prepare_resume_reply): Change ptid argument's type from unsigned
6606 long to ptid_t. Adjust. Implement W;process and X;process.
6607 (free_sym_cache, clear_symbol_cache): New.
6608 (look_up_one_symbol): Adjust to per-process symbol cache. *
6609 * server.c (cont_thread, general_thread, step_thread): Change type
6612 (multi_process): New.
6613 (last_ptid): Change type to ptid_t.
6614 (struct vstop_notif) <ptid>: Change type to ptid_t.
6615 (queue_stop_reply, push_event): Change `ptid' argument's type to
6617 (discard_queued_stop_replies): Add `pid' argument.
6618 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6619 changes. Don't reference the `attached' global.
6620 (attach_inferior): Adjust to mywait interface changes.
6621 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6622 features. Handle and report "multiprocess+". Handle
6624 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6626 (handle_v_kill): New.
6627 (handle_v_stopped): Adjust to use target_pid_to_str.
6628 (handle_v_requests): Allow multiple attaches and runs when
6629 multiprocess extensions are in effect. Handle "vKill".
6630 (myresume): Adjust to use ptids.
6631 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6632 (handle_status): Adjust to discard_queued_stop_replies interface
6634 (first_thread_of, kill_inferior_callback)
6635 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6636 (main): Call initialize_inferiors. Adjust to use ptids, killing
6637 and detaching from all inferiors. Handle multiprocess packet
6639 * linux-low.h: Include gdb_proc_service.h.
6640 (struct process_info_private): New.
6641 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6642 <lwpid_of>: Use ptid_get_lwp.
6643 (get_lwp_thread): Adjust.
6644 (struct lwp_info): Add `dead' member.
6645 (find_lwp_pid): Declare.
6646 * linux-low.c (thread_db_active): Delete.
6647 (new_inferior): Adjust comment.
6648 (inferior_pid): Delete.
6649 (linux_add_process): New.
6650 (handle_extended_wait): Adjust.
6651 (add_lwp): Change unsigned long to ptid.
6652 (linux_create_inferior): Add process to processes table. Adjust
6653 to use ptids. Don't set new_inferior here.
6654 (linux_attach_lwp): Rename to ...
6655 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6656 it. Adjust to use ptids.
6657 (linux_attach_lwp): New.
6658 (linux_attach): Add process to processes table. Don't set
6660 (struct counter): New.
6661 (second_thread_of_pid_p, last_thread_of_process_p): New.
6662 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6664 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6665 processes. Remove process from process table.
6666 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6667 to multiple processes.
6668 (any_thread_of): New.
6669 (linux_detach): Add `pid' argument, and handle it. Remove process
6670 from processes table.
6671 (linux_join): Add `pid' argument. Handle it.
6672 (linux_thread_alive): Change unsighed long argument to ptid_t.
6673 Consider dead lwps as not being alive.
6674 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6675 threads we're not interested in.
6676 (same_lwp, find_lwp_pid): New.
6677 (linux_wait_for_lwp): Change `pid' argument's type from int to
6679 (linux_wait_for_event): Rename to ...
6680 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6681 from int to ptid_t. Adjust.
6682 (linux_wait_for_event): New.
6683 (linux_wait_1): Add `ptid' argument. Change return type to
6684 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6685 that exit from the process table.
6686 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6688 (mark_lwp_dead): New.
6689 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6690 stopping all threads, mark its main lwp as dead.
6691 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6693 (fetch_register, usr_store_inferior_registers)
6694 (regsets_fetch_inferior_registers)
6695 (regsets_store_inferior_registers, linux_read_memory)
6696 (linux_write_memory): Inline `inferior_pid'.
6697 (linux_look_up_symbols): Adjust to use per-process
6699 (linux_request_interrupt): Adjust to use ptids.
6700 (linux_read_auxv): Inline `inferior_pid'.
6701 (initialize_low): Don't reference thread_db_active.
6702 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6703 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6704 (ps_getpid): Return the pid of the current inferior.
6705 * thread-db.c (proc_handle, thread_agent): Delete.
6706 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6708 (find_one_thread): Change argument type to ptid_t. Adjust to
6710 (maybe_attach_thread): Adjust to per-process data and ptids.
6711 (thread_db_find_new_threads): Ditto.
6712 (thread_db_init): Ditto.
6713 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6714 processes table. Adjust to use ptids.
6715 (spu_kill, spu_detach): Adjust interface. Remove process from
6717 (spu_join, spu_thread_alive): Adjust interface.
6718 (spu_wait): Adjust interface. Remove process from processes
6719 table. Adjust to use ptids.
6720 * win32-low.c (current_inferior_tid): Delete.
6721 (current_inferior_ptid): New.
6722 (debug_event_ptid): New.
6723 (thread_rec): Take a ptid. Adjust.
6724 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6725 (child_delete_thread): Ditto.
6726 (do_initial_child_stuff): Add `attached' argument. Add process to
6728 (child_fetch_inferior_registers, child_store_inferior_registers):
6730 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6731 (win32_attach): Pass 1 to do_initial_child_stuff.
6732 (win32_kill): Adjust interface. Remove process from processes
6734 (win32_detach): Ditto.
6735 (win32_join): Adjust interface.
6736 (win32_thread_alive): Take a ptid.
6737 (win32_resume): Adjust to use ptids.
6738 (get_child_debug_event): Ditto.
6739 (win32_wait): Adjust interface. Remove exiting process from
6742 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6744 Non-stop mode support.
6746 * server.h (non_stop): Declare.
6747 (gdb_client_data, handler_func): Declare.
6748 (delete_file_handler, add_file_handler, start_event_loop):
6750 (handle_serial_event, handle_target_event, push_event)
6751 (putpkt_notif): Declare.
6752 * target.h (enum resume_kind): New.
6753 (struct thread_resume): Replace `step' field by `kind' field.
6754 (TARGET_WNOHANG): Define.
6755 (struct target_ops) <wait>: Add `options' argument.
6756 <supports_non_stop, async, start_non_stop>: New fields.
6757 (target_supports_non_stop, target_async): New.
6758 (start_non_stop): Declare.
6759 (mywait): Add `options' argument.
6760 * target.c (mywait): Add `options' argument. Print child exit
6762 (start_non_stop): New.
6763 * server.c (non_stop, own_buf, mem_buf): New globals.
6764 (struct vstop_notif): New.
6765 (notif_queue): New global.
6766 (queue_stop_reply, push_event, discard_queued_stop_replies)
6767 (send_next_stop_reply): New.
6768 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6770 (attach_inferior): In non-stop mode, don't wait for the target
6772 (handle_general_set): Handle QNonStop.
6773 (handle_query): When handling qC, return the current general
6774 thread, instead of the first thread of the list.
6775 (handle_query): If the backend supports non-stop mode, include
6776 QNonStop+ in the qSupported query response.
6777 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6779 (handle_v_attach, handle_v_run): Handle non-stop mode.
6780 (handle_v_stopped): New.
6781 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6782 (myresume): Adjust to use resume_kind. Handle non-stop.
6783 (queue_stop_reply_callback): New.
6784 (handle_status): Handle non-stop mode.
6785 (main): Clear non_stop flag on reconnection. Use the event-loop.
6786 Refactor serial protocol handling from here ...
6787 (process_serial_event): ... to this new function. When GDB
6788 selects any thread, select one here. In non-stop mode, wait until
6789 GDB acks all pending events before exiting.
6790 (handle_serial_event, handle_target_event): New.
6791 * remote-utils.c (remote_open): Install remote_desc in the event
6793 (remote_close): Remove remote_desc from the event loop.
6794 (putpkt_binary): Rename to...
6795 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6796 (putpkt_binary): New as wrapper around putpkt_binary_1.
6797 (putpkt_notif): New.
6798 (prepare_resume_reply): In non-stop mode, don't change the
6800 * event-loop.c: New.
6801 * Makefile.in (OBJ): Add event-loop.o.
6802 (event-loop.o): New rule.
6804 * linux-low.h (pid_of): Moved here.
6806 (get_lwp_thread): Use lwpid_of.
6807 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6808 * linux-low.c (pid_of): Delete.
6809 (inferior_pid): Use lwpid_of.
6810 (linux_event_pipe): New.
6811 (target_is_async_p): New.
6813 (handle_extended_wait): Use lwpid_of.
6814 (add_lwp): Don't set lwpid field.
6815 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6816 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6817 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6818 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6819 first. Adjust to linux_wait_for_event interface changes. Use
6821 (linux_detach): Don't delete the main lwp here.
6822 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6823 (status_pending_p): Don't consider explicitly suspended lwps.
6824 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6825 pointer. Add OPTIONS argument. Change return type to int. Use
6826 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6827 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6828 pointer. Add status pointer argument. Return a pid instead of a
6829 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6830 changes. In non-stop mode, don't switch to a random thread.
6831 (linux_wait): Rename to...
6832 (linux_wait_1): ... this. Add target_options argument, and handle
6833 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6834 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6835 clean exit and signal exit code. Don't stop all threads in
6836 non-stop mode. In all-stop mode, only stop all threads when
6837 reporting a stop to GDB. Handle explicit thread stop requests.
6838 (async_file_flush, async_file_mark): New.
6840 (send_sigstop): Use lwpid_of.
6841 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6842 interface changes. In non-stop mode, don't switch to a random
6844 (linux_resume_one_lwp): Use lwpid_of.
6845 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6846 (linux_resume_one_thread): ... this. Handle resume_stop. In
6847 non-stop mode, don't look for pending flag in all threads.
6848 (resume_status_pending_p): Don't consider explicitly suspended
6850 (my_waitpid): Reimplement. Emulate __WALL.
6851 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6853 (sigchld_handler, linux_supports_non_stop, linux_async)
6854 (linux_start_non_stop): New.
6855 (linux_target_ops): Register linux_supports_non_stop, linux_async
6856 and linux_start_non_stop.
6857 (initialize_low): Install SIGCHLD handler.
6858 * thread-db.c (thread_db_create_event, find_one_thread)
6859 (thread_db_get_tls_address): Use lwpid_of.
6860 * win32-low.c (win32_detach): Adjust to use resume_kind.
6861 (win32_wait): Add `options' argument.
6862 * spu-low.c (spu_resume): Adjust to use resume_kind.
6863 (spu_wait): Add `options' argument.
6865 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6867 Decouple target code from remote protocol.
6869 * target.h (enum target_waitkind): New.
6870 (struct target_waitstatus): New.
6871 (struct target_ops) <wait>: Return an unsigned long. Take a
6872 target_waitstatus pointer instead of a char pointer.
6874 * target.c (mywait): Change prototype to return an unsigned long.
6875 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6876 * server.h (thread_from_wait, old_thread_from_wait): Delete
6878 (prepare_resume_reply): Change prototype to take a
6880 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6881 (last_status, last_ptid): New.
6882 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6883 pid instead of a signal.
6884 (attach_inferior): Remove "status" and "signal" parameters.
6886 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6888 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6889 (handle_v_requests, myresume): Remove "status" and "signal"
6891 (handle_status): New.
6892 (main): Delete local `status'. Adjust.
6893 * remote-utils.c: Include target.h.
6894 (prepare_resume_reply): Change prototype to take a
6895 target_waitstatus. Adjust.
6897 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6899 * spu-low.c (spu_wait): Adjust.
6900 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6902 (win32_wait): Adjust.
6904 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6906 * target.h (struct thread_resume): Delete leave_stopped member.
6907 (struct target_ops): Add a `n' argument to the `resume' callback.
6908 * server.c (start_inferior): Adjust.
6909 (handle_v_cont, myresume): Adjust.
6910 * linux-low.c (check_removed_breakpoint): Adjust to resume
6911 interface change, and to removed leave_stopped field.
6912 (resume_ptr): Delete.
6913 (struct thread_resume_array): New.
6914 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6915 resume interface change.
6916 (linux_continue_one_thread, linux_queue_one_thread)
6917 (resume_status_pending_p): Check if the resume field is NULL
6918 instead of checking the leave_stopped member.
6919 (linux_resume): Adjust to the target resume interface change.
6920 * spu-low.c (spu_resume): Adjust to the target resume interface
6922 * win32-low.c (win32_detach, win32_resume): Ditto.
6924 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6926 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6928 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6930 (linux_continue_one_thread): Only preserve the stepping flag if
6931 there's a pending breakpoint.
6933 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6935 * server.c (main): After the inferior having exited, call
6936 remote_close before exiting gdbserver.
6938 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6940 Fix size of FPSCR in Power 7 processors.
6941 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6942 (PPC_FEATURE_HAS_DFP): New #define.
6943 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6946 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6948 * server.c (handle_query) Whitespace and formatting.
6950 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6952 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6953 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6954 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6955 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6956 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6957 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6958 Makefile.in, configure.ac: Fix whitespace throughout.
6959 * configure: Regenerate.
6961 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6963 * inferiors.c (find_inferior): Make it safe for the callback
6964 function to delete the currently iterated inferior.
6966 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6968 * Makefile.in (linuw_low_h): Move higher.
6969 (thread-db.o): Depend on $(linux_low_h).
6971 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6973 Rename "process" to "lwp" throughout.
6975 * linux-low.c (all_processes): Rename to...
6976 (all_lwps): ... this.
6977 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6978 (add_process): Rename to ...
6979 (add_lwp): ... this. Adjust.
6980 (linux_create_inferior): Adjust.
6981 (linux_attach_lwp): Adjust.
6982 (linux_attach): Adjust.
6983 (linux_kill_one_process): Rename to ...
6984 (linux_kill_one_lwp): ... this. Adjust.
6985 (linux_kill): Adjust.
6986 (linux_detach_one_process): Rename to ...
6987 (linux_detach_one_lwp): ... this. Adjust.
6988 (linux_detach): Adjust.
6989 (check_removed_breakpoint): Adjust.
6990 (status_pending_p): Adjust.
6991 (linux_wait_for_process): Rename to ...
6992 (linux_wait_for_lwp): ... this. Adjust.
6993 (linux_wait_for_event): Adjust.
6994 (send_sigstop): Adjust.
6995 (wait_for_sigstop): Adjust.
6996 (stop_all_processes): Rename to ...
6997 (stop_all_lwps): ... this.
6998 (linux_resume_one_process): Rename to ...
6999 (linux_resume_one_lwp): ... this. Adjust.
7000 (linux_set_resume_request, linux_continue_one_thread)
7001 (linux_queue_one_thread, resume_status_pending_p)
7002 (usr_store_inferior_registers, regsets_store_inferior_registers)
7003 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7005 * linux-low.h (get_process): Rename to ...
7006 (get_lwp): ... this. Adjust.
7007 (get_thread_process): Rename to ...
7008 (get_thread_lwp): ... this. Adjust.
7009 (get_process_thread): Rename to ...
7010 (get_lwp_thread): ... this. Adjust.
7011 (struct process_info): Rename to ...
7012 (struct lwp_info): ... this.
7013 (all_processes): Rename to ...
7014 (all_lwps): ... this.
7015 * proc-service.c (ps_lgetregs): Adjust.
7016 * thread-db.c (thread_db_create_event, find_one_thread)
7017 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7019 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7021 * server.c (handle_query): Handle "qAttached".
7023 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7025 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7026 GPLv3, update license URL.
7028 2009-03-01 Doug Evans <dje@google.com>
7030 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7031 (server_h): Add gdb_signals.h.
7032 (signals.o): Update.
7033 * server.h (target_signal_from_host,target_signal_to_host_p)
7034 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7036 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7038 * remote-utils.c (getpkt): Also generate remote-debug
7039 information if noack_mode is set.
7041 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7043 * server.c (handle_query): Report qXfer:siginfo:read and
7044 qXfer:siginfo:write as supported and handle them.
7045 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7046 * linux-low.c (linux_xfer_siginfo): New.
7047 (linux_target_ops): Set it.
7049 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7051 * server.c (gdbserver_usage): Mention --remote-debug.
7052 (main): Accept '--remote-debug' switch.
7054 2009-01-18 Doug Evans <dje@google.com>
7056 * regcache.c (new_register_cache): No need to check result of xcalloc.
7057 * server.c (handle_search_memory): Back out calls to xmalloc,
7058 result is checked and error is returned to user upon failure.
7059 (handle_query): Ditto. Add more checks for result of malloc.
7060 (handle_v_cont): Check result of malloc, report error back to
7062 (handle_v_run): Ditto. Call freeargv.
7063 * server.h (freeargv): Declare.
7064 * utils.c (freeargv): New fn.
7066 2009-01-15 Doug Evans <dje@google.com>
7068 * gdbreplay.c (perror_with_name): Make arg const char *.
7069 * server.h (target_signal_to_name): Make return type const char *.
7070 * thread-db.c (thread_db_err_str): Make return type const char *.
7071 * utils.c (perror_with_name): Make arg const char *.
7073 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7075 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7076 when handling a EXIT_PROCESS_DEBUG_EVENT.
7078 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7080 * gdbreplay.c (gdbreplay_version): Update copyright year.
7081 * server.c (gdbserver_version): Likewise.
7083 2009-01-05 Doug Evans <dje@google.com>
7085 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7086 (handle_extended_wait): Improve comment.
7088 2008-12-13 Doug Evans <dje@google.com>
7090 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7091 * server.h (ATTR_MALLOC): New macro.
7092 (xmalloc,xcalloc,xstrdup): Declare.
7093 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7094 * inferiors.c: Ditto.
7095 * linux-low.c: Ditto.
7096 * mem-break.c: Ditto.
7097 * regcache.c: Ditto.
7098 * remote-utils.c: Ditto.
7101 * win32-low.c: Ditto.
7103 2008-12-12 Doug Evans <dje@google.com>
7105 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7106 in debugging printf.
7108 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7110 2008-12-09 Doug Evans <dje@google.com>
7112 * linux-low.h (struct process_info): Delete member tid, unused.
7113 * thread-db.c (find_one_thread): Update.
7114 (maybe_attach_thread): Update.
7116 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7118 * target.h (struct target_ops): Add qxfer_osdata member.
7119 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7121 (linux_qxfer_osdata): New functions.
7122 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7124 * server.c (handle_query): Handle "qXfer:osdata:read:".
7125 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7126 (buffer_xml_printf): New functions.
7127 * server.h (struct buffer): New.
7128 (buffer_grow_str, buffer_grow_str0): New macros.
7129 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7130 (buffer_xml_printf): Declare.
7132 2008-11-24 Doug Evans <dje@google.com>
7134 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7136 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7138 * server.c (handle_v_run): Always use the supplied argument list.
7140 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7142 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7143 (xtensa_regmap_table): Add entry for scompare1.
7145 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7147 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7148 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7149 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7150 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7151 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7152 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7153 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7154 XML target descriptions.
7155 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7156 when inferior is running on an ISA 2.05 or later processor. Add
7157 special case to return offset for full 64-bit slot of FPSCR when
7160 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7162 * Makefile.in (SFILES, clean): Added sparc64 files.
7163 (reg-sparc64.o, reg-sparc64.c): New.
7164 * configure.srv (sparc*-*-linux*): New configuration.
7165 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7166 syscall arguments for SPARC.
7167 (regsets_store_inferior_registers): Likewise.
7168 * linux-sparc-low.c: New file.
7170 2008-10-21 Doug Evans <dje@google.com>
7172 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7173 (READLINE_DIR,READLINE_DEP): Delete.
7174 (INTERNAL_CFLAGS): Update.
7175 (LINTFLAGS): Update.
7177 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7179 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7180 whole argv from the last run, not just argv[0].
7182 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7184 * regcache.c (new_register_cache): Return NULL if the register
7185 cache size isn't known yet.
7186 (free_register_cache): Avoid dereferencing a NULL regcache.
7188 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7190 * configure.srv: Merge MIPS and MIPS64.
7192 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7194 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7196 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7198 * Makefile.in: Add required vsx dependencies.
7200 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7201 Declare init_registers_powerpc_vsx32l.
7202 Declare init_registers_powerpc_vsx64l.
7203 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7204 (ppc_arch_setup): Check for VSX in hwcap.
7205 (ppc_fill_vsxregset): New function.
7206 (ppc_store_vsxregset): New function.
7207 Add new VSX entry in regset_info target_regsets.
7209 * configure.srv: Add new VSX dependencies.
7211 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7213 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7214 (remote_open): Set or clear transport_is_reliable.
7215 (putpkt_binary): Don't expect acks in noack mode.
7216 (getpkt): Don't send ack/nac in noack mode.
7217 * server.c (handle_general_set): Handle QStartNoAckMode.
7218 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7220 (main): Reset noack_mode on every connection.
7221 * server.h (noack_mode): Declare.
7223 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7225 * Makefile.in (GDBREPLAY_OBS): New variable.
7226 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7228 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7229 Daniel Jacobowitz <dan@codesourcery.com>
7231 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7232 (usr_store_inferior_registers): Likewise.
7233 (regsets_store_inferior_registers): Likewise.
7235 2008-07-31 Rolf Jansen <rj@surtec.com>
7236 Pedro Alves <pedro@codesourcery.com>
7238 * configure.ac: Check for memmem declaration.
7239 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7240 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7241 (disable_packet_qfThreadInfo): Unconditionally compile.
7242 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7243 * configure, config.in: Regenerate.
7245 2008-07-28 Doug Kwan <dougkwan@google.com>
7247 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7248 (linux_write_memory): Remove declaration of errno.
7250 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7252 * linux-low.c (handle_extended_wait): Do not use "status"
7253 variable uninitialized.
7255 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7257 * server.c (handle_v_attach): Inhibit reporting dll changes.
7259 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7261 * remote-utils.c (prepare_resume_reply): If requested, don't
7262 output "thread:TID" in the T stop reply.
7264 * server.c (disable_packet_vCont, disable_packet_Tthread)
7265 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7266 (handle_query): If requested, disable support for qC, qfThreadInfo
7268 (handle_v_requests): If requested, disable support for vCont.
7269 (gdbserver_show_disableable): New.
7270 (main): Handle --disable-packet and --disable-packet=LIST.
7272 * server.h (disable_packet_vCont, disable_packet_Tthread)
7273 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7275 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7277 * server.c (gdbserver_usage): Mention --version.
7279 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7281 * Makefile.in (gdbreplay.o): New rule.
7283 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7285 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7286 message, not gdbserver.
7288 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7289 Nathan Sidwell <nathan@codesourcery.com>
7290 Joseph Myers <joseph@codesourcery.com>
7292 * acinclude.m4: Include ../../config/acx.m4.
7293 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7294 * configure, config.in: Regenerate.
7295 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7296 * server.c (gdbserver_version): Print PKGVERSION.
7297 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7298 (main): Adjust gdbserver_usage calls.
7299 * gdbreplay.c (version, host_name): Add declarations.
7300 (gdbreplay_version, gdbreplay_usage): New.
7301 (main): Accept --version and --help options.
7303 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7305 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7306 (arm_breakpoint_at): Handle Thumb.
7307 (the_low_target): Add comment.
7309 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7311 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7313 2008-05-09 Doug Evans <dje@google.com>
7315 * server.h (decode_search_memory_packet): Declare.
7316 * remote-utils.c (decode_search_memory_packet): New fn.
7317 * server.c (handle_search_memory_1): New fn.
7318 (handle_search_memory): New fn.
7319 (handle_query): Process qSearch:memory packets.
7321 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7323 * regcache.c (registers_length): Remove.
7324 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7325 full register packet.
7326 * regcache.h (registers_length): Remove prototype.
7327 * server.h (PBUFSIZ): Define to 16384.
7329 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7331 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7332 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7333 powerpc-64l.o, and powerpc-altivec64l.o.
7334 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7335 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7336 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7337 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7338 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7341 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7342 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7343 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7344 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7345 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7346 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7347 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7348 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7349 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7350 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7353 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7354 (init_registers_powerpc_32l): ... this new prototype.
7355 (init_registers_powerpc_32): Remove, replace by ...
7356 (init_registers_powerpc_altivec32l): ... this new prototype.
7357 (init_registers_powerpc_e500): Remove, replace by ...
7358 (init_registers_powerpc_e500l): ... this new prototype.
7359 (init_registers_ppc64): Remove, replace by ...
7360 (init_registers_powerpc_64l): ... this new prototype.
7361 (init_registers_powerpc_64): Remove, replace by ...
7362 (init_registers_powerpc_altivec64l): ... this new prototype.
7363 (ppc_num_regs): Set to 73.
7364 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7365 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7366 (ppc_cannot_store_register): Handle orig_r3 and trap.
7367 (ppc_arch_setup): Update init_registers_... calls.
7368 (ppc_fill_gregset): Handle orig_r3 and trap.
7370 * inferiors.c (clear_inferiors): Reset current_inferior.
7372 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7374 * acinclude.m4: Add override.m4.
7375 * configure: Regenerate.
7377 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7379 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7380 initial call to init_register_ppc64.
7382 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7384 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7385 single powerpc*-*-linux* case.
7386 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7388 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7390 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7391 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7393 * linux-ppc-low.c: Include <elf.h>.
7394 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7395 (ppc_hwcap): New global variable.
7396 (ppc_regmap): Remove __SPE__ #ifdef sections.
7397 (ppc_regmap_e500): New global variable.
7398 (ppc_cannot_store_register): Update __SPE__ special case.
7399 (ppc_get_hwcap): New function.
7400 (ppc_arch_setup): Use it to determine whether inferior supports
7401 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7402 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7403 Do not access registers if target does not support AltiVec.
7404 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7405 Do not access registers if target does not support SPE.
7406 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7408 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7410 * linux-low.c (disabled_regsets, num_regsets): New.
7411 (use_regsets_p): Delete.
7412 (linux_wait_for_process): Clear disabled_regsets.
7413 (regsets_fetch_inferior_registers): Check and set it.
7414 (regsets_store_inferior_registers): Likewise.
7415 (linux_fetch_registers, linux_store_registers): Do not use
7417 (initialize_low): Allocate disabled_regsets.
7419 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7421 * Makefile.in (LIBOBJS): New.
7423 (memmem.o): New rule.
7424 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7425 * configure: Regenerated.
7427 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7429 * server.c (handle_query): Never return "unsupported" for
7430 qXfer:features:read queries.
7432 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7434 * server.c (get_features_xml): Fix inverted condition.
7435 (handle_query): Always support qXfer:feature:read.
7437 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7439 * server.c (wrapper_argv): New.
7440 (start_inferior): Handle wrapper_argv. If set, expect an extra
7442 (gdbserver_usage): Document --wrapper.
7443 (main): Parse --wrapper.
7445 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7447 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7448 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7449 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7450 (ppc_set_pc): Likewise.
7451 (ppc_arch_setup): New function.
7452 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7453 of collect_register.
7454 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7456 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7458 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7459 instead of linux-ppc64-low.o.
7460 * linux-ppc64-low.c: Remove file.
7461 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7462 (linux-ppc64-low.o): Remove rule.
7464 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7465 (init_registers_powerpc_64): Likewise.
7466 (ppc_regmap): Conditionally define depending on __powerpc64__.
7467 (ppc_cannot_store_register): Do not special-case "fpscr" when
7468 compiled on __powerpc64__.
7469 (ppc_collect_ptrace_register): New function.
7470 (ppc_supply_ptrace_register): New function.
7471 (ppc_breakpoint): Change type to "unsigned int".
7472 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7473 (the_low_target): Conditionally provide initializers for the
7474 arch_setup member depending on __powerpc64__. Install
7475 collect_ptrace_register and supply_ptrace_register members.
7477 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7479 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7480 * server.c (gdbserver_xmltarget): Define.
7481 (get_features_xml): Use it to replace "target.xml" and arch_string.
7483 * configure.srv: Remove srv_xmltarget. Add XML files that were
7484 mentioned there to srv_xmlfiles instead. Remove conditional tests
7485 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7486 srv_xmlfiles and srv_regobj to include all possible choices.
7487 * configure.ac (srv_xmltarget): Remove.
7488 (srv_xmlfiles): Do not add "target.xml".
7489 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7490 checks for supplementary target information.
7491 * configure: Regenerate.
7492 * Makefile.in (XML_TARGET): Remove.
7493 (target.xml): Remove rule.
7494 (clean): Do not clean up target.xml.
7495 (.PRECIOUS): Do not mention target.xml.
7497 * target.h (struct target_ops): Remove arch_string member.
7498 * linux-low.c (linux_arch_string): Remove.
7499 (linux_target_ops): Remove arch_string initializer.
7500 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7501 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7502 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7503 * spu-low.c (spu_arch_string): Remove.
7504 (spu_target_ops): Remove arch_string initializer.
7505 * win32-low.c (win32_arch_string): Remove.
7506 (win32_target_ops): Remove arch_string initializer.
7507 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7508 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7509 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7511 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7513 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7514 by collect_ptrace_register and supply_ptrace_register hooks.
7515 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7516 instead of checking for the_low_target.left_pad_xfer.
7517 (usr_store_inferior_registers): Use collect_ptrace_register callback
7518 instead of checking for the_low_target.left_pad_xfer.
7520 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7521 (s390_supply_ptrace_register): Likewise.
7522 (s390_fill_gregset): Call s390_collect_ptrace_register.
7523 (the_low_target): Update.
7525 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7526 (ppc_supply_ptrace_register): Likewise.
7527 (the_low_target): Update.
7529 * linux-i386-low.c (the_low_target): Update.
7530 * linux-x86-64-low.c (the_low_target): Update.
7532 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7534 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7535 reg-s390.o and reg-s390x.o.
7537 * linux-low.c (new_inferior): New global variable.
7538 (linux_create_inferior, linux_attach): Set it.
7539 (linux_wait_for_process): Call the_low_target.arch_setup after the
7540 target has stopped for the first time.
7541 (initialize_low): Do not call the_low_target.arch_setup.
7543 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7544 (s390_set_pc): Likewise.
7545 (s390_arch_setup): New function.
7546 (the_low_target): Use s390_arch_setup as arch_setup routine.
7548 * regcache.c (realloc_register_cache): New function.
7549 (set_register_cache): Call it for each existing regcache.
7551 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7553 * server.h (init_registers): Remove prototype.
7555 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7556 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7557 instead of init_registers ().
7558 * linux-arm-low.c (init_registers_arm): Add prototype.
7559 (init_registers_arm_with_iwmmxt): Likewise.
7560 (the_low_target): Add initializer for arch_setup field.
7561 * linux-cris-low.c (init_registers_cris): Add prototype.
7562 (the_low_target): Add initializer for arch_setup field.
7563 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7564 (the_low_target): Add initializer for arch_setup field.
7565 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7566 (the_low_target): Add initializer for arch_setup field.
7567 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7568 (the_low_target): Add initializer for arch_setup field.
7569 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7570 (the_low_target): Add initializer for arch_setup field.
7571 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7572 (the_low_target): Add initializer for arch_setup field.
7573 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7574 (init_registers_mips64_linux): Likewise.
7575 (the_low_target): Add initializer for arch_setup field.
7576 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7577 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7578 (the_low_target): Add initializer for arch_setup field.
7579 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7580 (init_registers_powerpc_64): Likewise.
7581 (the_low_target): Add initializer for arch_setup field.
7582 * linux-s390-low.c (init_registers_s390): Add prototype.
7583 (init_registers_s390x): Likewise.
7584 (the_low_target): Add initializer for arch_setup field.
7585 * linux-sh-low.c (init_registers_sh): Add prototype.
7586 (the_low_target): Add initializer for arch_setup field.
7587 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7588 (the_low_target): Add initializer for arch_setup field.
7589 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7590 (the_low_target): Add initializer for arch_setup field.
7592 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7593 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7594 instead of init_registers ().
7595 * win32-arm-low.c (init_registers_arm): Add prototype.
7596 (the_low_target): Add initializer for arch_setup field.
7597 * win32-i386-low.c (init_registers_i386): Add prototype.
7598 (the_low_target): Add initializer for arch_setup field.
7600 * spu-low.c (init_registers_spu): Add prototype.
7601 (initialize_low): Call initialie_registers_spu () instead of
7602 initialize_registers ().
7604 2008-02-19 Pedro Alves <pedro@codesourcery.com>
7606 * server.c (handle_v_requests): When handling the vRun and vAttach
7607 packets, if already debugging a process, don't kill it. Return an
7610 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7612 * server.c (handle_query): Correct length check.
7614 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7616 * win32-low.c (do_initial_child_stuff): Add process handle
7617 parameter. Set current_process_handle and current_process_id from the
7618 parameters. Clear globals.
7619 (win32_create_inferior): Don't set current_process_handle and
7620 current_process_id here. Instead pass them on the call to
7621 do_initial_child_stuff.
7622 (win32_attach): Likewise.
7623 (win32_clear_inferiors): New.
7624 (win32_kill): Don't close the current process handle or the
7625 current thread handle here. Instead call win32_clear_inferiors.
7626 (win32_detach): Don't open a new handle to the process. Call
7627 win32_clear_inferiors.
7628 (win32_join): Don't rely on current_process_handle; open a new
7629 handle using the process id.
7630 (win32_wait): Call win32_clear_inferiors when the inferior process
7633 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7635 * server.c (monitor_show_help): Add "exit".
7637 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7639 * Makefile.in (SFILES): Add linux-xtensa-low.c.
7640 (clean): Add reg-xtensa.c.
7641 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7642 * configure.srv (xtensa*-*-linux*) New target.
7643 * linux-xtensa-low.c: New.
7644 * xtensa-xtregs.c: New.
7646 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7648 * hostio.c: Don't include errno.h.
7649 (errno_to_fileio_errno): Move to hostio-errno.
7650 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7651 error number outputting to the target->hostio_last_error callback.
7652 (hostio_packet_error): Use FILEIO_EINVAL directly.
7653 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7654 calls to hostio_error.
7655 * hostio-errno.c: New.
7656 * server.h (hostio_last_error_from_errno): Declare.
7657 * target.h (target_ops): Add hostio_last_error member.
7658 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7659 as hostio_last_error handler.
7660 * spu-low.c (spu_target_ops): Likewise.
7661 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7662 (wince_hostio_last_error): New functions.
7663 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7664 as hostio_last_error handler.
7665 (win32_target_ops) [!_WIN32_WCE]: Register
7666 hostio_last_error_from_errno as hostio_last_error handler.
7667 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7668 (hostio-errno.o): New rule.
7669 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7670 * configure.srv (srv_hostio_err_objs): New variable. Default to
7672 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7673 * configure: Regenerate.
7675 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7677 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7678 (linux_kill, linux_detach): Clean up the process list.
7679 * remote-utils.c (remote_open): Improve port number parsing.
7680 (putpkt_binary, input_interrupt): Only send interrupts if the target
7682 * server.c (extended_protocol): Make static.
7683 (attached): Define earlier.
7684 (exit_requested, response_needed, program_argv): New variables.
7685 (target_running): New.
7686 (start_inferior): Clear attached here.
7687 (attach_inferior): Set attached here.
7688 (require_running): Define.
7689 (handle_query): Use require_running and target_running. Implement
7691 (handle_v_attach, handle_v_run): New.
7692 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7693 (gdbserver_usage): Update.
7694 (main): Redo argument parsing. Handle --debug and --multi. Handle
7695 --attach along with other options or after the port. Save
7696 program_argv. Support no initial program. Resynchronize
7697 communication with GDB after an error. Handle "monitor exit".
7698 Use require_running and target_running. Always allow the extended
7699 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7700 restart in extended mode.
7701 * README: Refer to the GDB manual. Update --attach usage.
7703 2007-12-20 Andreas Schwab <schwab@suse.de>
7705 * linux-low.c (STACK_SIZE): Define.
7706 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7707 (linux_test_for_tracefork): Likewise.
7709 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7711 * linux-low.c (linux_wait_for_event): Update messages. Do not
7712 reinsert auto-delete breakpoints.
7713 * mem-break.c (struct breakpoint): Change return type of handler to
7715 (set_breakpoint_at): Update handler type.
7716 (reinsert_breakpoint_handler): Return 1 instead of calling
7718 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7720 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7721 * mem-break.h (set_breakpoint_at): Update handler type.
7722 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7723 * win32-low.c (auto_delete_breakpoint): New.
7724 (get_child_debug_event): Use it.
7726 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7728 * configure.ac: Check for pread and pwrite.
7729 * hostio.c (handle_pread): Fall back to lseek and read.
7730 (handle_pwrite): Fall back to lseek and write.
7731 * config.in, configure: Regenerated.
7733 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7735 * server.c (myresume): Add own_buf argument.
7736 (main): Update calls.
7738 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7740 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7741 * remote-utils.c (remote_open): Do not call disable_async_io.
7742 (block_async_io): Delete.
7743 (unblock_async_io): Make static.
7744 (initialize_async_io): New.
7745 * server.c (handle_v_cont): Handle async I/O here.
7746 (myresume): Likewise. Move other common resume tasks here...
7747 (main): ... from here. Call initialize_async_io. Disable async
7748 I/O before the main loop.
7749 * server.h (initialize_async_io): Declare.
7750 (block_async_io, unblock_async_io): Delete prototypes.
7751 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7753 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7755 * remote-utils.c (readchar): Allow binary data in received messages.
7757 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7759 * win32-low.c (attaching): New global.
7760 (win32_create_inferior): Clear the `attaching' global.
7761 (win32_attach): Set the `attaching' global.
7762 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7763 attaching. Only set a breakpoint at the entry point if not
7766 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7768 * server.c (main): Don't report dll events on the initial
7769 connection on attaches.
7771 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7773 * server.c (main): Relax numerical bases supported for the pid of
7774 the --attach command line argument.
7776 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7778 * win32-low.c (win32_attach): Call OpenProcess before
7779 DebugActiveProcess, not after. Add last error output to error
7782 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7784 * win32-low.c (win32_get_thread_context)
7785 (win32_set_thread_context): New functions.
7786 (thread_rec): Use win32_get_thread_context.
7787 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7788 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7791 2007-12-03 Leo Zayas
7792 Pedro Alves <pedro_alves@portugalmail.pt>
7794 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7796 (child_add_thread): Minor cleanup.
7797 (child_continue): Resume artificially suspended threads before
7798 calling ContinueDebugEvent.
7799 (suspend_one_thread): New.
7800 (fake_breakpoint_event): New.
7801 (get_child_debug_event): Change return type to int. Check here if
7802 gdb sent an interrupt request. If a soft interrupt was requested,
7803 fake a breakpoint event. Return 0 if there is no event to handle,
7805 (win32_wait): Don't check here if gdb sent an interrupt request.
7806 Ensure there is a valid event to handle.
7807 (win32_request_interrupt): Add soft interruption method as last
7810 2007-12-03 Leo Zayas
7811 Pedro Alves <pedro_alves@portugalmail.pt>
7813 * win32-low.h (win32_thread_info): Add descriptions to the
7814 structure members. Replace `suspend_count' counter by a
7816 * win32-low.c (thread_rec): Update condition of when to get the
7817 context from the inferior. Rely on ContextFlags being set if it
7818 has already been retrieved. Only suspend the inferior thread if
7819 we haven't already. Warn if that fails.
7820 (continue_one_thread): s/suspend_count/suspended/. Only call
7821 ResumeThread once. Warn if that fails.
7823 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7825 * win32-low.c (win32_wait): Don't read from the inferior when it
7828 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7830 * Makefile.in (win32_low_h): New variable.
7831 (win32-low.o): Add dependency on $(win32_low_h).
7832 (win32-arm-low.o, win32-i386-low.o): New rules.
7834 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7836 * hostio.c: Correct copyright year.
7838 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7840 * Makefile.in (OBS): Add hostio.o.
7841 (hostio.o): New rule.
7842 * server.h (handle_vFile): Declare.
7843 * hostio.c: New file.
7844 * server.c (handle_v_requests): Take packet_len and new_packet_len
7845 for binary packets. Call handle_vFile.
7846 (main): Update call to handle_v_requests.
7848 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7850 * linux-low.c: Include <sched.h>.
7852 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7854 * linux-low.c (linux_tracefork_grandchild): New.
7855 (linux_tracefork_child): Use clone.
7856 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7858 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7860 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7862 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7864 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7866 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7868 * inferiors.c (change_inferior_id): Delete.
7869 (add_pid_to_list, pull_pid_from_list): New.
7870 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7871 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7872 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7873 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7874 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7875 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7876 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7877 (using_threads): Always set to 1.
7878 (handle_extended_wait): New.
7879 (add_process): Do not set TID.
7880 (linux_create_inferior): Set must_set_ptrace_flags.
7881 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7882 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7883 (linux_thread_alive): Rename TID argument to LWPID.
7884 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7885 (linux_wait_for_event): Do not use TID or check using_threads. Update
7886 call to dead_thread_notify. Call handle_extended_wait.
7887 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7888 (send_sigstop): Delete sigstop_sent.
7889 (wait_for_sigstop): Avoid TID.
7890 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7891 (linux_test_for_tracefork): New.
7892 (linux_lookup_signals): Use thread_db_active and
7893 linux_supports_tracefork_flag.
7894 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7895 * linux-low.h (get_process_thread): Avoid TID.
7896 (struct process_ifo): Move thread_known and tid to the end. Remove
7898 (linux_attach_lwp, thread_db_init): Update prototypes.
7899 * server.h (change_inferior_id): Delete prototype.
7900 (add_pid_to_list, pull_pid_from_list): New prototypes.
7901 * thread-db.c (thread_db_use_events): New.
7902 (find_first_thread): Rename to...
7903 (find_one_thread): ...this. Update callers and messages. Do not
7904 call fatal. Check thread_db_use_events. Do not call
7905 change_inferior_id or new_thread_notify.
7906 (maybe_attach_thread): Update. Do not call new_thread_notify.
7907 (thread_db_init): Set thread_db_use_events. Check use_events.
7908 * utils.c (fatal, warning): Correct message prefix.
7910 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7912 * Makefile.in (clean): Remove new files.
7913 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7914 (powerpc-64.o, powerpc-64.c): New rules.
7915 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7916 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7918 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7920 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7921 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7922 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7923 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7924 (target_regsets): Add AltiVec and SPE register sets.
7925 * configure.ac: Check for AltiVec and SPE.
7926 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7927 (ppc_fill_vrregset, ppc_store_vrregset): New.
7928 (target_regsets): Add AltiVec register set.
7929 * configure: Regenerated.
7931 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7933 * linux-low.c (O_LARGEFILE): Define.
7934 (linux_read_memory): Use /proc/PID/mem.
7935 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7936 * configure, config.in: Regenerated.
7938 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7940 * linux-low.c (linux_wait_for_event): Do not pass signals while
7943 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7945 * win32-low.c (create_process): New.
7946 (win32_create_inferior): Use create_process instead of
7947 CreateProcess. If create_process failed retry appending an ".exe"
7948 suffix. Store the GetLastError result immediatelly after
7949 create_process calls and use it on the call to error.
7951 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7953 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7955 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7957 * configure.ac: Switch license to GPLv3.
7959 2007-08-01 Michael Snyder <msnyder@access-company.com>
7961 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7963 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7965 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7967 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7968 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7969 CloseToolhelp32Snapshot.
7970 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7971 CloseToolhelp32Snapshot.
7973 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7975 * server.c (main): Check for inferior exit before main loop.
7977 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7979 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7980 instead of on tmp_desc.
7982 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7983 Daniel Jacobowitz <dan@codesourcery.com>
7985 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7986 (add_thread): Minor cleanups.
7987 (clear_inferiors): Move lower in the file. Clear the DLL
7989 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7990 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7991 (xml_escape_text): New.
7992 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7994 (handle_v_cont): Report errors.
7995 (gdbserver_version): Update.
7996 (main): Correct size of own_buf. Do not report initial DLL events.
7997 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7998 (unloaded_dll, xml_escape_text): New.
7999 * win32-low.c (enum target_waitkind): Update comments.
8000 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8001 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8002 (win32_EnumProcessModules, win32_GetModuleInformation)
8003 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8004 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8005 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8006 (win32_Module32First, win32_Module32Next, load_toolhelp)
8007 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8008 (get_child_debug_event): Handle DLL events.
8009 (win32_wait): Likewise.
8011 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8013 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8014 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8016 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8018 * win32-low.c (handle_output_debug_string): Ignore event if not
8021 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8023 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8025 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8027 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8029 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8031 * inferiors.c (change_inferior_id): Add comment.
8032 * linux-low.c (check_removed_breakpoint): Add an early
8033 prototype. Improve debug output.
8034 (linux_attach): Doc update.
8035 (linux_detach_one_process, linux_detach): Clean up before releasing
8037 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8038 * linux-low.h (struct process_info): Doc improvement.
8039 * mem-break.c (delete_all_breakpoints): New.
8040 * mem-break.h (delete_all_breakpoints): New prototype.
8041 * thread-db.c (find_first_thread): New.
8042 (thread_db_create_event): Call it instead of
8043 thread_db_find_new_threads. Clean up unused variables.
8044 (maybe_attach_thread): Remove first thread handling.
8045 (thread_db_find_new_threads): Use find_first_thread.
8046 (thread_db_get_tls_address): Likewise.
8048 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8050 * thread-db.c (thread_db_find_new_threads): Add prototype.
8051 (thread_db_create_event): Check for the main thread before adding
8053 (maybe_attach_thread): Only enable event reporting if TID == 0.
8054 (thread_db_get_tls_address): Check for new threads.
8056 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8058 * linux-low.c (linux_create_inferior): Try execv before execvp.
8059 * spu-low.c (spu_create_inferior): Likewise.
8061 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8063 * linux-low.c (linux_create_inferior): Change execv to execvp.
8064 * spu-low.c (spu_create_inferior): Likewies.
8066 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8068 * Makefile.in (clean): Clean new files instead of deleted ones.
8069 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8070 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8072 * configure.srv: Specify XML files and new regformats for MIPS and
8074 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8075 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8076 an entry for the restart register.
8077 (mips_cannot_fetch_register, mips_cannot_store_register)
8078 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8079 register names to match the XML descriptions.
8080 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8081 restart register instead of $0.
8083 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8084 Markus Deuling <deuling@de.ibm.com>
8086 * remote-utils.c (decode_xfer_write): New function.
8087 * server.h (decode_xfer_write): Add prototype.
8088 * server.c (handle_query): Add PACKET_LEN argument. Support
8089 qXfer:spu:read and qXfer:spu:write packets.
8090 (main): Pass packet_len to handle_query.
8091 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8092 * target.h (target_ops): Add qxfer_spu.
8094 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8096 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8097 accessing non-seekable spufs files.
8099 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8101 * server.c (handle_query): Add reply for qC packet.
8103 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8104 Leo Zayas <lerele@champenstudios@com>
8106 * server.h (check_remote_input_interrupt_request): New function.
8107 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8108 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8109 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8110 (check_remote_input_interrupt_request): New function.
8111 * server.h (check_remote_input_interrupt_request): Declare.
8112 * win32-low.c (winapi_DebugBreakProcess,
8113 winapi_GenerateConsoleCtrlEvent): New typedefs.
8114 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8116 (win32_wait): Check for remote interrupt request
8117 with check_remote_input_interrupt_request.
8118 (win32_request_interrupt): New function.
8119 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8121 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8123 * win32-low.c (debug_registers_changed,
8124 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8125 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8126 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8127 (thread_rec): Get context using the low target.
8128 (child_add_thread): Call thread_added on the low target,
8129 which does the same thing.
8131 (do_initial_child_stuff): Remove debug registers references.
8132 Set context using the low target. Resume threads after
8133 setting the contexts.
8134 (child_continue): Remove dead variable. Remove debug
8135 registers references.
8136 (child_fetch_inferior_registers): Go through the low target.
8137 (do_child_store_inferior_registers): Remove.
8138 (child_store_inferior_registers): Go through the low target.
8139 (win32_resume): Remove debug registers references.
8140 Set context using the low target.
8141 (handle_exception): Change return type to void. Don't record
8142 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8143 first chance exception.
8144 (get_child_debug_event): Change return type to void. Remove
8145 goto loop. Always return after waiting for debug event.
8146 (win32_wait): Convert to switch statement. Handle spurious
8149 * win32-i386-low.c (debug_registers_changed,
8150 debug_registers_used): New.
8151 (initial_stuff): Rename to ...
8152 (i386_initial_stuff): ... this. Clear debug registers
8154 (store_debug_registers): Delete.
8155 (i386_get_thread_context): New.
8156 (load_debug_registers): Delete.
8157 (i386_set_thread_context): New.
8158 (i386_thread_added): New.
8159 (single_step): Rename to ...
8160 (i386_single_step): ... this.
8161 (do_fetch_inferior_registers): Rename to ...
8162 (i386_fetch_inferior_register): ... this.
8163 (i386_store_inferior_register): New.
8164 (the_low_target): Adapt to new interface.
8166 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8167 (arm_get_thread_context): New.
8168 (arm_set_thread_context): New.
8170 (do_fetch_inferior_registers): Rename to ...
8171 (arm_fetch_inferior_register): ... this.
8172 (arm_store_inferior_register): New.
8173 (arm_wince_breakpoint): Reimplement as unsigned long.
8174 (arm_wince_breakpoint_len): Define.
8175 (the_low_target): Adapt to new interface.
8177 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8178 load_debug_registers. Add get_thread_context, set_thread_context,
8179 thread_added and store_inferior_register. Rename
8180 fetch_inferior_registers to fetch_inferior_register.
8181 (regptr): Remove declaration.
8183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8185 * linux-low.c (linux_detach): Change return type to int. Return 0.
8186 * spu-low.c (spu_detach): Likewise.
8188 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8190 * target.h (target_ops): Change return type of detach to int.
8192 (join_inferior): New.
8193 * server.c (main): Don't skip detach support on mingw32.
8194 If the inferior doesn't support detaching return error.
8195 Call join_inferior instead of using waitpid.
8196 * linux-low.c (linux_join): New.
8197 (linux_target_op): Add linux_join.
8198 * spu-low.c (spu_join): New.
8199 (spu_target_ops): Add spu_join.
8200 * win32-low.c (win32_detach): Adapt to new interface.
8201 Reopen current_process_handle before detaching. Issue a child
8202 resume before detaching.
8204 (win32_target_op): Add win32_join.
8206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8208 * win32-low.c (win32-attach): Fix return value.
8209 * target.h (target_ops): Describe ATTACH return values.
8211 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8213 * win32-low.c (GETPROCADDRESS): Define.
8214 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8215 (winapi_DebugSetProcessKillOnExit): Likewise.
8216 (win32_create_inferior): Force usage of ansi CreateProcessA.
8217 (win32_attach): Use GETPROCADDRESS.
8218 (win32_detach): Likewise.
8220 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8222 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8224 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8226 * win32-low.c: Commit leftover changes from 2007-03-29.
8228 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8230 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8231 fields short instead of int. Add explicit padding.
8232 (i387_cache_to_fsave): Remove unnecessary casts.
8233 (i387_fsave_to_cache): Doc fix.
8234 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8236 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8238 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8239 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8241 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8243 * configure.srv (arm*-*-mingw32ce*): Move near the other
8246 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8248 * configure.ac: Add errno checking.
8249 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8250 sys/file.h and malloc.h.
8251 (AC_CHECK_DECLS): Add perror.
8252 (srv_mingwce): Handle.
8253 * configure.srv (i[34567]86-*-cygwin*): Add
8254 win32-i386-low.o to srv_tgtobj.
8255 (i[34567]86-*-mingw*): Likewise.
8256 (arm*-*-mingw32ce*): Add case.
8257 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8258 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8259 [__MINGW32CE__] (strerror): New function.
8260 [__MINGW32CE__] (errno): Define to GetLastError.
8261 [__MINGW32CE__] (COUNTOF): New macro.
8262 (remote_open): Remove extra close call.
8263 * mem-break.c (delete_breakpoint_at): New function.
8264 * mem-break.h (delete_breakpoint_at): Declare.
8265 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8266 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8267 [USE_WIN32API] (read, write): Add char* casts.
8268 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8269 * server.h: Include wincecompat.h on Windows CE.
8270 [HAVE_ERRNO_H]: Check.
8271 (perror): Declare if not declared.
8272 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8273 (perror_with_name): Remove errno declaration.
8274 * wincecompat.h: New.
8275 * wincecompat.c: New.
8277 * win32-arm-low.c: New.
8278 * win32-i386-low.c: New.
8279 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8280 (OUTMSG2): Make it safe.
8282 (COUNTOF): New macro.
8283 (NUM_REGS): Get it from the low target.
8284 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8285 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8286 (thread_rec): Let low target handle debug registers.
8287 (child_add_thread): Likewise.
8288 (child_init_thread_list): Likewise.
8289 (continue_one_thread): Likewise.
8291 (do_child_fetch_inferior_registers): Move to ...
8292 * win32-i386-low.c: ... here, and rename to ...
8293 (do_fetch_inferior_registers): ... this.
8294 * win32-low.c (child_fetch_inferior_registers):
8295 Go through the low target.
8296 (do_child_store_inferior_registers): Use regptr.
8297 (strwinerror): New function.
8298 (win32_create_inferior): Handle Windows CE.
8299 Use strwinerror instead of strerror on Windows error
8300 codes. Add program to the error output.
8301 Don't close the main thread handle on Windows CE.
8302 (win32_attach): Use coredll.dll on Windows CE.
8303 (win32_kill): Close current process and current
8305 (win32_detach): Use coredll.dll on Windows CE.
8306 (win32_resume): Let low target handle debug registers, and
8308 (handle_exception): Add/Remove initial breakpoint. Avoid
8309 non-existant WSTOPSIG on Windows CE.
8310 (win32_read_inferior_memory): Cast to remove warning.
8311 (win32_arch_string): Go through the low target.
8312 (initialize_low): Call set_breakpoint_data with the low
8313 target's breakpoint.
8314 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8315 FOP_REGNUM, mappings): Move to ...
8316 * win32-i386-low.c: ... here.
8317 * win32-low.c (win32_thread_info): Move to ...
8318 * win32-low.h: ... here.
8319 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8320 win32-arm-low.c and wincecompat.c.
8321 (all:): Add $EXEEXT.
8322 (install-only:): Likewise.
8323 (gdbserver:): Likewise.
8324 (gdbreplay:): Likewise.
8325 * config.in: Regenerate.
8326 * configure: Regenerate.
8328 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8330 * win32-low.c: Rename typedef thread_info to
8331 win32_thread_info throughout.
8333 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8335 * win32-i386-low.c: Rename to ...
8336 * win32-low.c: ... this.
8337 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8338 * Makefile.in: Likewise.
8340 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8342 * remote-utils.c (monitor_output): Constify msg parameter.
8343 * server.h (monitor_output): Likewise.
8344 * win32-i386-low.c (handle_output_debug_string): New.
8345 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8346 handle_output_debug_string.
8347 (get_child_debug_event): Likewise.
8349 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8351 * server.c (main): Correct strtoul check.
8353 2007-03-27 Jon Ringle <jon@ringle.org>
8355 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8357 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8359 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8361 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8363 * terminal.h: Check HAVE_SGTTY_H.
8365 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8367 * remote-utils.c (remote_open): Print out the assigned port number.
8369 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8371 * remote-utils.c (monitor_output): New function.
8372 * server.c (debug_threads): Define here.
8373 (monitor_show_help): New function.
8374 (handle_query): Handle qRcmd.
8375 (main): Do not handle 'd' packet.
8376 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8377 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8380 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8382 * Makefile.in (EXEEXT): New.
8383 (clean): Use $(EXEEXT).
8385 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8387 * target.h (target_ops): Rename send_signal to request_interrupt,
8388 and remove enum target_signal parameter.
8389 * linux-low.c (linux_request_interrupt): Rename from
8390 linux_send_signal, and always send SIGINT.
8391 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8392 and always send SIGINT.
8393 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8395 (input_interrupt): Likewise.
8397 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8399 * server.c (get_features_xml): Check if target implemented
8401 * win32-i386-low.c (win32_arch_string): New.
8402 (win32_target_ops): Add win32_arch_string as arch_string member.
8404 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8406 * spu-low.c (spu_arch_string): New.
8407 (spu_target_ops): Add spu_arch_string.
8409 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8411 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8412 * configure.ac: Do not check for terminal.h.
8413 * configure, config.in: Regenerated.
8415 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8417 * Makefile.in (OBS): Add $(XML_BUILTIN).
8418 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8420 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8421 (arm-with-iwmmxt.c): New.
8422 * config.in, configure: Regenerate.
8423 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8424 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8425 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8426 (arm*-*-linux*): Add iWMMXt and regset support.
8427 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8428 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8429 (arm_store_wmmxregset, target_regsets): New.
8430 * server.c (get_features_xml): Take annex argument. Check builtin
8432 (handle_query): Handle multiple annexes.
8434 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8436 * remote-utils.c [USE_WIN32API] (read, write): Define.
8437 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8440 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8442 * linux-i386-low.c (the_low_target): Set arch_string.
8443 * linux-x86-64-low.c (the_low_target): Likewise.
8444 * linux-low.c (linux_arch_string): New.
8445 (linux_target_ops): Add it.
8446 * linux-low.h (struct linux_target_ops): Add arch_string.
8447 * server.c (write_qxfer_response): Use const void * for DATA.
8448 (get_features_xml): New.
8449 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8450 * target.h (struct target_ops): Add arch_string method.
8452 2007-01-03 Denis Pilat <denis.pilat@st.com>
8453 Daniel Jacobowitz <dan@codesourcery.com>
8455 * linux-low.c (linux_kill): Handle being called with no threads.
8456 * win32-i386-low.c (win32_kill): Likewise.
8457 (get_child_debug_event): Clear current_process_handle.
8459 2006-12-30 Denis PILAT <denis.pilat@st.com>
8460 Daniel Jacobowitz <dan@codesourcery.com>
8462 * remote-utils.c (remote_open): Check the type of specified
8463 serial port devices before opening them.
8464 * server.c (main): Kill the inferior if an error occurs during
8465 the first remote_open.
8467 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8469 * README: Update supported targets.
8471 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8473 * Makefile.in (clean): Remove reg-mips64.c.
8474 (reg-mips64.c, reg-mips64.o): New rules.
8475 * configure.srv: Handle mips64. Include regset support for mips.
8476 * linux-mips-low.c (union mips_register): New.
8477 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8478 (mips_breakpoint, mips_breakpoint_at): Use int.
8479 (mips_collect_register, mips_supply_register)
8480 (mips_collect_register_32bit, mips_supply_register_32bit)
8481 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8482 (mips_store_fpregset, target_regsets): New.
8483 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8485 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8487 * configure.srv: Add target "spu*-*-*".
8488 * Makefile.in (clean): Remove reg-spu.c.
8489 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8490 * spu-low.c: New file.
8492 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8494 * configure.ac: Correct td_thr_tls_get_addr test.
8495 * configure: Regenerated.
8497 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8499 * linux-low.c (linux_wait_for_event): Reformat. Use the
8501 * remote-utils.c (decode_address_to_semicolon): New.
8502 * server.c (pass_signals, handle_general_set): New.
8503 (handle_query): Mention QPassSignals for qSupported.
8504 (main): Call handle_general_set.
8505 * server.h (pass_signals, decode_address_to_semicolon): New.
8507 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8509 * server.c (handle_query): Correct error handling for read_auxv.
8511 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8513 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8514 and srv_linux_thread_db to yes.
8515 * linux-s390-low.c (s390_fill_gregset): New function.
8516 (target_regsets): Define data structure.
8518 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8520 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8521 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8522 * config.in, configure: Regenerated.
8523 * inferiors.c (gdb_id_to_thread): New function.
8524 (gdb_id_to_thread_id): Use it.
8525 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8526 * linux-low.h (struct process_info): Add th member.
8527 (thread_db_get_tls_address): New prototype.
8528 * remote-utils.c (decode_address): Make non-static.
8529 * server.c (handle_query): Handle qGetTLSAddr.
8530 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8531 * target.h (struct target_ops): Add get_tls_address.
8532 * thread-db.c (maybe_attach_thread): Save the thread handle.
8533 (thread_db_get_tls_address): New.
8535 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8537 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8538 (linux_resume_one_process): Take a siginfo_t *. Update all
8539 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8540 (struct pending_signals): Add a siginfo_t.
8541 (linux_wait_for_process): Always set last_status.
8542 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8543 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8544 * linux-low.h (struct process_info): Add last_status.
8546 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8548 * remote-utils.c (try_rle): New function.
8549 (putpkt_binary): Use it.
8551 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8553 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8554 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8555 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8556 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8557 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8560 2006-08-08 Richard Sandiford <richard@codesourcery.com>
8562 * server.c (terminal_fd): New variable.
8563 (old_foreground_pgrp): Likewise.
8564 (restore_old_foreground_pgrp): New function.
8565 (start_inferior): Record the terminal file descriptor in terminal_fd
8566 and its original foreground group in old_foreground_pgrp. Register
8567 restore_old_foreground_pgrp with atexit().
8569 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8571 * server.c (handle_query): Correct qPart to qXfer.
8573 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8575 * configure.ac: Check for more headers which are missing on
8576 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8577 * configure.srv: Add Cygwin and mingw32.
8578 * remote-utils.c: Don't include headers unconditionally which
8579 are missing on mingw32. Include <winsock.h> for mingw32.
8580 (remote_open): Adjust for mingw32 support. Flush
8581 standard error after writing to it.
8582 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8583 (unblock_async_io, enable_async_io, disable_async_io)
8584 (readchar, getpkt): Update for Winsock support.
8585 (prepare_resume_reply): Expect a protocol signal number.
8586 * server.c: Disable <sys/wait.h> on mingw32.
8587 (start_inferior): Adjust for mingw32 support. Flush
8588 standard error after writing to it.
8589 (attach_inferior): Likewise. Use protocol signal
8591 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8593 * win32-i386-low.c: New file.
8594 * Makefile.in (XM_CLIBS): Set.
8595 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8596 (win32-i386-low.o): New dependency rule.
8597 * linux-low.c (linux_wait): Use target signal numbers.
8598 * target.h (struct target_ops): Doc fix.
8599 * server.h (target_signal_to_name): New prototype.
8600 * gdbreplay.c: Don't include headers unconditionally which
8601 are missing on mingw32. Include <winsock.h> for mingw32.
8602 (remote_close, remote_open): Adjust for Winsock support.
8603 * configure, config.in: Regenerated.
8605 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8607 * server.c (decode_xfer_read, write_qxfer_response): New.
8608 (handle_query): Take a packet length argument. Handle
8609 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8610 the qSupported response.
8611 (main): Update call to handle_query.
8613 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8615 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8616 (putpkt_binary): Renamed from putpkt and adjusted for binary
8618 (putpkt): New wrapper for putpkt_binary.
8619 (readchar): Don't mask off the high bit.
8620 (decode_X_packet): New function.
8621 * server.c (main): Call putpkt_binary if a handler sets the packet
8622 length. Save the length of the incoming packet. Handle 'X'.
8623 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8625 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8627 * server.c (handle_query): Handle qSupported.
8629 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8631 * remote-utils.c (all_symbols_looked_up): New variable.
8632 (look_up_one_symbol): Check it.
8633 * server.h (look_up_one_symbol): New declaration.
8634 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8636 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8638 * Makefile.in (linux-arm-low.o): Update dependencies.
8639 * linux-arm-low.c: Include "gdb_proc_service.h".
8640 (PTRACE_GET_THREAD_AREA): Define.
8641 (ps_get_thread_area): New function.
8643 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8645 * configure.srv (m68k*-*-uclinux*): New target.
8646 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8647 (linux_resume_one_process): Remove extraneous cast.
8648 (linux_read_offsets): New.
8649 (linux_target_op): Add linux_read_offsets on mmuless systems.
8650 * server.c (handle_query): Add qOffsets logic.
8651 * target.h (struct target_ops): Add read_offsets.
8653 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8655 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8656 (PTRACE_GET_THREAD_AREA): Define.
8657 (ps_get_thread_area): New function.
8658 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8659 (linux-x86-64-low.o): Update.
8661 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8663 * configure.ac: Remove checks for prfpregset_t.
8664 * gdb_proc_service.h: New file.
8665 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8666 new "gdb_proc_service.h".
8667 * proc-service.c: Likewise.
8668 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8669 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8670 * Makefile.in (gdb_proc_service_h): Updated.
8671 * configure, config.in: Regenerated.
8673 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8675 * remote-utils.c (prepare_resume_reply): Move declaration
8676 of gdb_id_from_wait to the top of the block.
8678 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8680 * linux-low.c (regsets_store_inferior_registers): Read the regset
8681 from the target before filling it.
8683 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8685 * server.c (attach_inferior): Return SIGTRAP for a successful
8688 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8690 * Makefile.in (OBS): Add version.o.
8691 (STAGESTUFF): Delete.
8692 (version.o): Add dependencies.
8693 (version.c): Replace rule.
8694 (clean): Remove version.c.
8695 * server.c (gdbserver_version): New.
8696 (gdbserver_usage): Use printf.
8697 (main): Handle --version and --help.
8698 * server.h (version, host_name): Add declarations.
8700 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8712 * linux-x86-64-low.c:
8715 * linux-ppc64-low.c:
8724 * linux-crisv32-low.c:
8736 * gdbserver.1: Add (C) after Copyright. Update the FSF
8739 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8741 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8742 (arm_breakpoint_at): Recognize both breakpoints.
8743 (the_low_target): Use the correct breakpoint instruction.
8745 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8747 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8748 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8749 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8750 (the_low_target): Update.
8752 2005-10-25 Andreas Schwab <schwab@suse.de>
8754 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8756 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8757 (ia64_num_regs): Reduce to 462.
8759 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8761 * acinclude.m4: Correct quoting.
8762 * aclocal.m4: Regenerated.
8764 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8765 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8766 (thread_db_init): Call thread_db_err_str.
8767 * configure.ac: Check for TD_VERSION.
8768 * config.in, configure: Regenerated.
8770 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8772 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8774 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8776 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8777 is not available. Define HAVE_PTRACE_GETREGS if it is.
8778 * config.in, configure: Regenerated.
8779 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8780 * linux-i386-low.c, linux-m68k-low.c: Update to use
8781 HAVE_PTRACE_GETREGS.
8782 * linux-low.c (regsets_fetch_inferior_registers)
8783 (regsets_store_inferior_registers): Only return 0 if we processed
8785 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8786 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8788 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8790 * inferiors.c (struct thread_info): Add gdb_id.
8791 (add_thread): Add gdb_id argument.
8792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8793 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8794 calls to add_thread.
8795 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8796 * server.c (handle_query): Use thread_to_gdb_id.
8797 (handle_v_cont, main): Use gdb_id_to_thread_id.
8798 * server.h (add_thread): Update prototype.
8799 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8802 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8804 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8805 left-padded registers.
8806 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8807 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8809 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8811 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8812 * configure: Regenerate.
8813 * config.in: Regenerate.
8814 * server.h (NEED_DECLARATION_STRERROR):
8815 Replace with !HAVE_DECL_STRERROR.
8817 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8819 * linux-low.c (linux_wait, linux_send_signal): Don't test
8820 an unsigned long variable for > 0 if it could be MAX_ULONG.
8821 * server.c (myresume): Likewise.
8822 * target.c (set_desired_inferior): Likewise.
8824 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8826 * configure.ac: Simplify and improve check for socklen_t.
8827 * configure, config.in: Regenerate.
8829 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8831 * acconfig.h: Remove.
8832 * configure.ac: Add a test for socklen_t. Use three-argument
8833 AC_DEFINE throughout.
8834 * config.in: Regenerated using autoheader 2.59.
8835 * configure: Regenerated.
8837 * gdbreplay.c (socklen_t): Provide a default.
8838 (remote_open): Use socklen_t.
8839 * remote-utils.c (socklen_t): Provide a default.
8840 (remote_open): Use socklen_t.
8841 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8844 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8846 * linux-low.c (linux_read_memory, linux_write_memory)
8847 (linux_read_auxv): Likewise.
8848 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8849 (check_mem_write): Likewise.
8850 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8852 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8853 (registers_from_string, register_data): Likewise.
8854 * server.c (handle_query, main): Likewise.
8855 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8856 (decode_M_packet): Likewise.
8857 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8858 * target.h (struct target_ops): Update read_memory, write_memory,
8860 (read_inferior_memory, write_inferior_memory): Update.
8861 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8863 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8864 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8865 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8866 linux-s390-low.c, linux-sh-low.c: Update for changes in
8867 read_inferior_memory and the_low_target->breakpoint.
8869 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8871 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8872 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8873 * configure.srv: Add powerpc64-*-linux*.
8874 * linux-ppc64-low.c: New file.
8876 2005-05-23 Orjan Friberg <orjanf@axis.com>
8878 * linux-cris-low.c: New file with support for CRIS.
8879 * linux-crisv32-low.c: Ditto for CRISv32.
8880 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8881 (clean): Add reg-cris.c and reg-crisv32.c.
8882 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8883 reg-crisv32.o, and reg-crisv32.c to make rules.
8884 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8887 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8889 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8890 of sizeof (PTRACE_XFER_TYPE).
8891 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8893 2005-05-12 Orjan Friberg <orjanf@axis.com>
8895 * target.h (struct target_ops): Add insert_watchpoint,
8896 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8897 pointers for hardware watchpoint support.
8898 * linux-low.h (struct linux_target_ops): Ditto.
8899 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8900 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8901 to linux_target_ops.
8902 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8904 * server.c (main): Recognize 'Z' and 'z' packets.
8906 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8908 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8909 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8910 (the_low_target): Add new members.
8912 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8914 * proc-service.c (ps_lgetregs): Search all_processes instead of
8917 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8919 * server.c (start_inferior): Change return type to int.
8920 (attach_inferior): Change sigptr to int *.
8921 (handle_v_cont, handle_v_requests): Change signal to int *.
8922 (main): Change signal to int.
8924 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8926 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8927 * configure.srv: Add m32r*-*-linux*.
8928 * linux-m32r-low.c: New file.
8930 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8932 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8934 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8936 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8937 Take unsigned long arguments for PIDs.
8938 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8939 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8940 (wait_for_sigstop, linux_resume_one_process)
8941 (regsets_fetch_inferior_registers, linux_send_signal)
8942 (linux_read_auxv): Likewise. Update the types of variables holding
8943 PIDs. Update format string specifiers.
8944 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8945 * remote-utils.c (prepare_resume_reply): Likewise.
8946 * server.c (cont_thread, general_thread, step_thread)
8947 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8949 (handle_query): Update format specifiers.
8950 (handle_v_cont, main): Use strtoul for thread IDs.
8951 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8952 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8953 (general_thread, step_thread, thread_from_wait)
8954 (old_thread_from_wait): Update.
8955 * target.h (struct thread_resume): Use unsigned long for THREAD.
8956 (struct target_ops): Use unsigned long for arguments to attach and
8959 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8961 * acinclude.m4: Include bfd/bfd.m4 directly.
8962 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8963 <agriffis@toolchain.org>.
8964 * aclocal.m4, configure: Regenerated.
8966 2005-01-07 Andrew Cagney <cagney@gnu.org>
8968 * configure.ac: Rename configure.in, require autoconf 2.59.
8969 * configure: Re-generate.
8971 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8973 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8975 * aclocal.m4: Regenerated.
8976 * configure: Regenerated.
8978 2004-11-21 Andreas Schwab <schwab@suse.de>
8980 * linux-m68k-low.c (m68k_num_gregs): Define.
8981 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8982 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8983 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8984 (m68k_breakpoint_at): New. Add to the_low_target.
8986 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8987 srv_linux_thread_db to yes.
8989 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8991 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8992 (ARCH_SET_FS): Likewise.
8993 (ARCH_GET_FS): Likewise.
8994 (ARCH_GET_GS): Likewise.
8996 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8998 * linux-i386-low.c (ps_get_thread_area): New.
8999 * linux-x86-64-low.c (ps_get_thread_area): New.
9000 * linux-low.c: Include <sys/syscall.h>.
9001 (linux_kill_one_process): Don't kill the first thread here.
9002 (linux_kill): Kill the first thread here.
9003 (kill_lwp): New function.
9004 (send_sigstop, linux_send_signal): Use it.
9005 * proc-service.c: Clean up #ifdefs.
9006 (fpregset_info): Delete.
9007 (ps_lgetregs): Update and enable implementation.
9008 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9010 * remote-utils.c (struct sym_cache, symbol_cache): New.
9011 (input_interrupt): Print a clearer message.
9012 (async_io_enabled): New variable.
9013 (enable_async_io, disable_async_io): Use it. Update comments.
9014 (look_up_one_symbol): Use the symbol cache.
9015 * thread-db.c (thread_db_look_up_symbols): New function.
9016 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9018 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9020 * configure.in: Test for -rdynamic.
9021 * configure: Regenerated.
9022 * Makefile (INTERNAL_LDFLAGS): New.
9023 (gdbserver, gdbreplay): Use it.
9025 2004-09-02 Andrew Cagney <cagney@gnu.org>
9027 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9029 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9031 * linux-low.c (linux_wait): Clear all_processes list also.
9033 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9035 * linux-low.c: Include <errno.h>. Remove extern declaration of
9038 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9040 * gdbreplay.c, server.h, utils.c: Update copyright years.
9042 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9044 * server.c (main): Print child status or termination signal from
9045 variable 'signal', not 'sig'.
9047 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9049 * linux-low.c (linux_read_memory): Change return type to
9050 int. Check for and return error from ptrace().
9051 * target.c (read_inferior_memory): Change return type to int. Pass
9052 back return status from the_target->read_memory().
9053 * target.h (struct target_ops): Adapt *read_memory() prototype.
9055 (read_inferior_memory): Adapt prototype.
9056 * server.c (main): Return an error packet if
9057 read_inferior_memory() returns an error.
9059 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9061 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9062 Unify with other clean targets.
9064 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9066 * server.c (handle_v_cont): Call set_desired_inferior.
9068 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9070 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9074 * linux-low.c (linux_wait): Unblock async I/O.
9075 (linux_resume): Block and enable async I/O.
9076 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9077 * server.h (block_async_io, unblock_async_io): Add prototypes.
9079 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9081 * remote-utils.c (remote_open): Print a status notice after
9083 * server.c (attach_inferior): Print a status notice after
9086 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9088 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9090 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9092 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9094 * server.c, target.h: Update copyright years.
9096 2004-02-25 Roland McGrath <roland@redhat.com>
9098 * target.h (struct target_ops): New member `read_auxv'.
9099 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9100 * linux-low.c (linux_read_auxv): New function.
9101 (linux_target_ops): Initialize `read_auxv' member to that.
9103 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9105 Committed by Jim Blandy <jimb@redhat.com>.
9107 * linux-s390-low.c (s390_num_regs): Update.
9108 (s390_regmap): Remove control registers. Use __s390x__ predefine
9109 instead of GPR_SIZE to distiguish s390 and s390x targets.
9111 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9113 * linux-low.c: Update copyright year.
9114 (check_removed_breakpoint): Clear pending_is_breakpoint.
9115 (linux_set_resume_request, linux_queue_one_thread)
9116 (resume_status_pending_p): New functions.
9117 (linux_continue_one_thread): Use process->resume.
9118 (linux_resume): Only resume threads if there are no pending events.
9119 * linux-low.h (struct process_info): Add resume request
9122 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9124 * regcache.c (new_register_cache): Clear the allocated register
9125 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9127 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9129 * linux-low.c (linux_resume): Take a struct thread_resume *
9131 (linux_wait): Update call.
9132 (resume_ptr): New static variable.
9133 (linux_continue_one_thread): Renamed from
9134 linux_continue_one_process. Use resume_ptr.
9135 (linux_resume): Use linux_continue_one_thread.
9136 * server.c (handle_v_cont, handle_v_requests): New functions.
9137 (myresume): New function.
9138 (main): Handle 'v' case.
9139 * target.h (struct thread_resume): New type.
9140 (struct target_ops): Change argument of "resume" to struct
9142 (myresume): Delete macro.
9144 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9146 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9147 (uninstall): Support DESTDIR.
9149 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9151 * configure.srv: Add xscale*linux copy of arm*linux entry.
9153 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9155 * linux-arm-low.c (arm_reinsert_addr): New function.
9156 (the_low_target): Add arm_reinsert_addr.
9158 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9160 * mem-break.c: Remove whitespace at end of file.
9162 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9164 * configure.in: Check whether we need to prototype strerror.
9165 * server.h: Optionally prototype strerror.
9166 * gdbreplay.c (perror_with_name): Use strerror.
9167 * linux-low.c (linux_attach_lwp): Use strerror.
9168 * utils.c (perror_with_name): Use strerror.
9169 * config.in, configure: Regenerated.
9171 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9173 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9174 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9176 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9178 * Makefile.in (SFILES): Update.
9179 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9180 low-sun3.c: Remove files.
9182 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9184 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9185 (linux_detach_one_process, linux_detach): New functions.
9186 (linux_target_ops): Add linux_detach.
9187 * server.c (main): Handle 'D' packet.
9188 * target.h (struct target_ops): Add "detach" member.
9189 (detach_inferior): Define.
9191 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9193 From Kelley Cook <kelleycook@wideopenwest.com>:
9194 * configure.srv: Accept i[34567]86 variants.
9196 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9198 * linux-low.c (linux_wait_for_event): Correct comment typos.
9199 (linux_resume_one_process): Call check_removed_breakpoint.
9200 (linux_send_signal): New function.
9201 (linux_target_ops): Add linux_send_signal.
9202 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9204 * target.h (struct target_ops): Add send_signal.
9206 2003-05-29 Jim Blandy <jimb@redhat.com>
9208 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9209 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9210 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9211 away part of the register's value.
9213 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9215 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9216 (linux_wait_for_event, linux_init_signals): Likewise.
9218 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9220 * configure.in: Check for stdlib.h.
9221 * configure: Regenerated.
9222 * config.in: Regenerated.
9224 2003-01-04 Andreas Schwab <schwab@suse.de>
9226 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9228 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9230 * Makefile.in: Remove obsolete code.
9232 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9234 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9235 defined(PT_FPR0_HI).
9237 2002-11-17 Stuart Hughes <seh@zee2.com>
9239 * linux-arm-low.c (arm_num_regs): Increase.
9240 (arm_regmap): Include status register.
9242 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9244 * linux-low.c (register_addr): Remove incorrect -1 check.
9246 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9248 * linux-low.c (linux_create_inferior): Call setpgid. Return
9250 (unstopped_p, linux_signal_pid): Remove.
9251 (linux_target_ops): Remove linux_signal_pid.
9252 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9253 global instead of target method.
9254 * target.h (struct target_ops): Remove signal_pid. Update comment
9255 for create_inferior.
9256 * server.c (signal_pid): New variable.
9257 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9258 gdbserver. Set the child to be the foreground process group.
9259 (attach_inferior): Set signal_pid.
9261 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9263 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9265 2002-08-20 Jim Blandy <jimb@redhat.com>
9267 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9270 2002-08-01 Andrew Cagney <cagney@redhat.com>
9272 * Makefile.in: Make chill references obsolete.
9274 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9276 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9277 * configure: Regenerate.
9278 * config.in: Regenerate.
9280 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9282 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9283 (perror_with_name, remote_close, remote_open, expect, play): Static.
9285 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9287 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9288 byte offsets instead of an array of indexes.
9289 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9291 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9293 * regcache.c: Add comment.
9295 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9297 * thread-db.c: New file.
9298 * proc-service.c: New file.
9299 * acinclude.m4: New file.
9300 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9301 proc-service.o, and thread-db.o.
9302 (linux-low.o): Add USE_THREAD_DB.
9303 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9304 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9305 * aclocal.m4: Regenerated.
9306 * config.in: Regenerated.
9307 * configure: Regenerated.
9308 * configure.in: Check for proc_service.h, sys/procfs.h,
9309 thread_db.h, and linux/elf.h headrs.
9310 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9311 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9312 Check for -lthread_db and thread support.
9313 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9314 PowerPC, and SuperH.
9315 * i387-fp.c: Constify arguments.
9316 * i387-fp.h: Likewise.
9317 * inferiors.c: (struct thread_info): Renamed from
9318 `struct inferior_info'. Remove PID member. Use generic inferior
9319 list header. All uses updated.
9320 (inferiors, signal_pid): Removed.
9321 (all_threads): New variable.
9322 (get_thread): Define.
9323 (add_inferior_to_list): New function.
9324 (for_each_inferior): New function.
9325 (change_inferior_id): New function.
9326 (add_inferior): Removed.
9327 (remove_inferior): New function.
9328 (add_thread): New function.
9329 (free_one_thread): New function.
9330 (remove_thread): New function.
9331 (clear_inferiors): Use for_each_inferior and free_one_thread.
9332 (find_inferior): New function.
9333 (find_inferior_id): New function.
9334 (inferior_target_data): Update argument type.
9335 (set_inferior_target_data): Likewise.
9336 (inferior_regcache_data): Likewise.
9337 (set_inferior_regcache_data): Likewise.
9338 * linux-low.c (linux_bp_reinsert): Remove.
9339 (all_processes, stopping_threads, using_thrads)
9340 (struct pending_signals, debug_threads, pid_of): New.
9341 (inferior_pid): Replace with macro.
9342 (struct inferior_linux_data): Remove.
9343 (get_stop_pc, add_process): New functions.
9344 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9345 Use add_process and add_thread.
9346 (linux_attach_lwp): New function, based on old linux_attach. Use
9347 add_process and add_thread. Set stop_expected for new threads.
9348 (linux_attach): New function.
9349 (linux_kill_one_process): New function.
9350 (linux_kill): Kill all LWPs.
9351 (linux_thread_alive): Use find_inferior_id.
9352 (check_removed_breakpoints, status_pending_p): New functions.
9353 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9354 Update. Use WNOHANG. Wait for cloned processes also. Update process
9355 struct for the found process.
9356 (linux_wait_for_event): New function.
9357 (linux_wait): Use it. Support LWPs.
9358 (send_sigstop, wait_for_sigstop, stop_all_processes)
9359 (linux_resume_one_process, linux_continue_one_process): New functions.
9360 (linux_resume): Support LWPs.
9361 (REGISTER_RAW_SIZE): Remove.
9362 (fetch_register): Use register_size instead. Call supply_register.
9363 (usr_store_inferior_registers): Likewise. Call collect_register.
9365 (regsets_fetch_inferior_registers): Improve error message.
9366 (regsets_store_inferior_registers): Add debugging.
9367 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9368 (unstopped_p, linux_signal_pid): New functions.
9369 (linux_target_ops): Add linux_signal_pid.
9370 (linux_init_signals): New function.
9371 (initialize_low): Call it. Initialize using_threads.
9372 * regcache.c (inferior_regcache_data): Add valid
9374 (get_regcache): Fetch registers lazily. Add fetch argument
9375 and update all callers.
9376 (regcache_invalidate_one, regcache_invalidate): New
9378 (new_register_cache): Renamed from create_register_cache.
9379 Return the new regcache.
9380 (free_register_cache): Change argument to a void *.
9381 (registers_to_string, registers_from_string): Call get_regcache
9382 with fetch flag set.
9383 (register_data): Make static. Pass fetch flag to get_regcache.
9384 (supply_register): Call get_regcache with fetch flag clear.
9385 (collect_register): Call get_regcache with fetch flag set.
9386 (collect_register_as_string): New function.
9387 * regcache.h: Update.
9388 * remote-utils.c (putpkt): Flush after debug output and use
9390 Handle input interrupts while waiting for an ACK.
9391 (input_interrupt): Use signal_pid method.
9392 (getpkt): Flush after debug output and use stderr.
9393 (outreg): Use collect_register_as_string.
9394 (new_thread_notify, dead_thread_notify): New functions.
9395 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9397 (look_up_one_symbol): Flush after debug output.
9398 * server.c (step_thread, server_waiting): New variables.
9399 (start_inferior): Don't use signal_pid. Update call to mywait.
9400 (attach_inferior): Update call to mywait.
9401 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9402 (main): Don't fetch/store registers explicitly. Use
9403 set_desired_inferior. Support proposed ``Hs'' packet. Update
9406 (struct inferior_list, struct_inferior_list_entry): New.
9407 * target.c (set_desired_inferior): New.
9408 (write_inferior_memory): Constify.
9409 (mywait): New function.
9411 (struct target_ops): New signal_pid method.
9412 (mywait): Removed macro, added prototype.
9414 * linux-low.h (regset_func): Removed.
9415 (regset_fill_func, regset_store_func): New.
9416 (enum regset_type): New.
9417 (struct regset_info): Add type field. Use new operation types.
9418 (struct linux_target_ops): stop_pc renamed to get_pc.
9419 Add decr_pc_after_break and breakpoint_at.
9420 (get_process, get_thread_proess, get_process_thread)
9421 (strut process_info, all_processes, linux_attach_lwp)
9422 (thread_db_init): New.
9424 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9425 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9426 (the_low_target): Add new members.
9427 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9428 (i386_store_fpxregset): Constify.
9429 (target_regsets): Add new kind identifier.
9430 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9431 (i386_set_pc): Add debugging.
9432 (i386_breakpoint_at): New function.
9433 (the_low_target): Add new members.
9434 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9435 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9436 (mips_breakpoint_at): New.
9437 (the_low_target): Add new members.
9438 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9439 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9440 (the_low_target): Add new members.
9441 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9442 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9443 (the_low_target): Add new members.
9444 * linux-x86-64-low.c (target_regsets): Add new kind
9447 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9449 From Martin Pool <mbp@samba.org>:
9450 * server.c (gdbserver_usage): New function.
9453 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9455 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9458 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9460 * Makefile.in: Remove obsolete code.
9462 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9464 * linux-low.c (regsets_fetch_inferior_registers),
9465 (regsets_store_inferior_registers): Removed cast to int from
9467 * regcache.h: Added declaration of struct inferior_info.
9469 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9471 * inferiors.c (struct inferior_info): Add regcache_data.
9472 (add_inferior): Call create_register_cache.
9473 (clear_inferiors): Call free_register_cache.
9474 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9475 * regcache.c (struct inferior_regcache_data): New.
9476 (registers): Remove.
9477 (get_regcache): New function.
9478 (create_register_cache, free_register_cache): New functions.
9479 (set_register_cache): Don't initialize the register cache here.
9480 (registers_to_string, registers_from_string, register_data): Call
9482 * regcache.h: Add prototypes.
9483 * server.h: Likewise.
9485 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9487 * mem-break.c: New file.
9488 * mem-break.h: New file.
9489 * Makefile.in: Add mem-break.o rule; update server.h
9491 * inferiors.c (struct inferior_info): Add target_data
9493 (clear_inferiors): Free target_data member if set.
9494 (inferior_target_data, set_inferior_target_data): New functions.
9495 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9496 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9497 * linux-low.c (linux_bp_reinsert): New variable.
9498 (struct inferior_linux_data): New.
9499 (linux_create_inferior): Use set_inferior_target_data.
9500 (linux_attach): Likewise. Call add_inferior.
9501 (linux_wait_for_one_inferior): New function.
9502 (linux_wait): Call it.
9503 (linux_write_memory): Add const.
9504 (initialize_low): Call set_breakpoint_data.
9505 * linux-low.h (struct linux_target_ops): Add breakpoint
9507 * server.c (attach_inferior): Remove extra add_inferior
9509 * server.h: Include mem-break.h. Update inferior.c
9511 * target.c (read_inferior_memory)
9512 (write_inferior_memory): New functions.
9513 * target.h (read_inferior_memory)
9514 (write_inferior_memory): Change macros to prototypes.
9515 (struct target_ops): Update comments. Add const to write_memory
9518 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
9520 * linux-low.c (usr_store_inferior_registers): Support
9521 registers which are allowed to fail to store.
9522 * linux-low.h (linux_target_ops): Likewise.
9523 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9524 (ppc_cannot_store_register): FPSCR may not be storable.
9526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9528 * server.h: Include <string.h> if HAVE_STRING_H.
9529 * ChangeLog: Correct paths in last ChangeLog entry.
9531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9533 * linux-low.h: Remove obsolete prototypes.
9534 (struct linux_target_ops): New.
9535 (extern the_low_target): New.
9536 * linux-low.c (num_regs, regmap): Remove declarations.
9537 (register_addr): Use the_low_target explicitly.
9538 (fetch_register): Likewise.
9539 (usr_fetch_inferior_registers): Likewise.
9540 (usr_store_inferior_registers): Likewise.
9541 * linux-arm-low.c (num_regs): Remove.
9542 (arm_num_regs): Define.
9543 (arm_regmap): Renamed from regmap, made static.
9544 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9546 (arm_cannot_store_register): Renamed from cannot_store_register,
9548 (the_low_target): New.
9549 * linux-i386-low.c (num_regs): Remove.
9550 (i386_num_regs): Define.
9551 (i386_regmap): Renamed from regmap, made static.
9552 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9554 (i386_cannot_store_register): Renamed from cannot_store_register,
9556 (the_low_target): New.
9557 * linux-ia64-low.c (num_regs): Remove.
9558 (ia64_num_regs): Define.
9559 (ia64_regmap): Renamed from regmap, made static.
9560 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9562 (ia64_cannot_store_register): Renamed from cannot_store_register,
9564 (the_low_target): New.
9565 * linux-m68k-low.c (num_regs): Remove.
9566 (m68k_num_regs): Define.
9567 (m68k_regmap): Renamed from regmap, made static.
9568 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9570 (m68k_cannot_store_register): Renamed from cannot_store_register,
9572 (the_low_target): New.
9573 * linux-mips-low.c (num_regs): Remove.
9574 (mips_num_regs): Define.
9575 (mips_regmap): Renamed from regmap, made static.
9576 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9578 (mips_cannot_store_register): Renamed from cannot_store_register,
9580 (the_low_target): New.
9581 * linux-ppc-low.c (num_regs): Remove.
9582 (ppc_num_regs): Define.
9583 (ppc_regmap): Renamed from regmap, made static.
9584 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9586 (ppc_cannot_store_register): Renamed from cannot_store_register,
9588 (the_low_target): New.
9589 * linux-s390-low.c (num_regs): Remove.
9590 (s390_num_regs): Define.
9591 (s390_regmap): Renamed from regmap, made static.
9592 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9594 (s390_cannot_store_register): Renamed from cannot_store_register,
9596 (the_low_target): New.
9597 * linux-sh-low.c (num_regs): Remove.
9598 (sh_num_regs): Define.
9599 (sh_regmap): Renamed from regmap, made static.
9600 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9602 (sh_cannot_store_register): Renamed from cannot_store_register,
9604 (the_low_target): New.
9605 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9606 (the_low_target): New.
9608 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9610 * Makefile.in: Add stamp-h target.
9611 * configure.in: Create stamp-h.
9612 * configure: Regenerated.
9614 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9616 * inferiors.c: New file.
9617 * target.c: New file.
9618 * target.h: New file.
9619 * Makefile.in: Add target.o and inferiors.o. Update
9621 * linux-low.c (inferior_pid): New static variable,
9622 moved from server.c.
9623 (linux_create_inferior): Renamed from create_inferior.
9624 Call add_inferior. Return 0 on success instead of a PID.
9625 (linux_attach): Renamed from myattach.
9626 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9627 (linux_thread_alive): Renamed from mythread_alive.
9628 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9630 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9631 (regsets_store_inferior_registers): Correct error message.
9632 Add missing ``return 0''.
9633 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9634 (linux_store_registers): Renamed from store_inferior_registers.
9635 (linux_read_memory): Renamed from read_inferior_memory.
9636 (linux_write_memory): Renamed from write_inferior_memory.
9637 (linux_target_ops): New structure.
9638 (initialize_low): Call set_target_ops ().
9639 * remote-utils.c (unhexify): New function.
9640 (hexify): New function.
9641 (input_interrupt): Send signals to ``signal_pid''.
9642 * server.c (inferior_pid): Remove.
9643 (start_inferior): Update create_inferior call.
9644 (attach_inferior): Call add_inferior.
9645 (handle_query): New function.
9646 (main): Call handle_query for `q' packets.
9647 * server.h: Include "target.h". Remove obsolete prototypes.
9648 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9650 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9652 * Makefile.in: Add WARN_CFLAGS. Update configury
9654 * configure.in: Check for <string.h>
9655 * configure: Regenerate.
9656 * config.in: Regenerate.
9657 * gdbreplay.c: Include needed system headers.
9658 (remote_open): Remove strchr prototype.
9659 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9660 * regcache.c (supply_register): Change buf argument to const void *.
9661 (supply_register_by_name): Likewise.
9662 (collect_register): Change buf argument to void *.
9663 (collect_register_by_name): Likewise.
9664 * regcache.h: Add missing prototypes.
9665 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9666 * server.c (handle_query): New function.
9667 (attached): New static variable, moved out of main.
9668 (main): Quiet longjmp clobber warnings.
9669 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9670 * utils.c (error): Remove NORETURN.