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