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