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