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